In a situation where you'd want to deny a user from running specific commands as root, you would modify their entry in the _________ file.

  • sudoers
  • shadow
  • passwd
  • groups
In a situation where you want to deny a user from running specific commands as root, you would modify their entry in the sudoers file. This file contains rules and permissions for granting or denying superuser privileges to users and groups.

For enhanced security, Linux passwords are not stored in plain text but are _________ before storing.

  • Hashed
  • Encrypted
  • Compressed
  • Obfuscated
For enhanced security, Linux passwords are not stored in plain text but are hashed before storing. Hashing is a one-way process that converts the password into a fixed-length string of characters. This makes it difficult for attackers to reverse the process and obtain the original password.

Which Linux command can be used to monitor real-time network interface statistics?

  • ifconfig
  • netstat
  • iptraf
  • nmap
The correct command to monitor real-time network interface statistics in Linux is iptraf. It provides detailed information about network traffic, including traffic per interface, protocols, and ports. ifconfig and netstat are used for network configuration and monitoring, but they don't offer real-time statistics. nmap is a network scanning tool.

In package management, a ________ is a collection of patches, configuration files, and scripts that adapt a software source code to a particular distribution.

  • Source Package
  • Binary Package
  • Source Code
  • Dependency
In package management, a "Source Package" is a collection of patches, configuration files, and scripts that adapt a software source code to a particular distribution. Source packages are used to build binary packages specific to a particular Linux distribution.

Your organization is implementing a policy to disable root login via SSH. Which configuration file and parameter should you modify?

  • /etc/ssh/sshd_config, PermitRootLogin
  • /etc/ssh/sshd_config, AllowRoot
  • /etc/ssh/ssh_config, DenyRoot
  • /etc/ssh/ssh_config, RootLogin
To disable root login via SSH, you should modify the /etc/ssh/sshd_config file and set the PermitRootLogin parameter to no. This enhances security by preventing direct root logins, encouraging users to log in as a regular user and then use sudo for administrative tasks.

In Bash, the ________ construct allows you to execute a specific block of code repeatedly as long as a certain condition is true.

  • while
  • until
  • for
  • if
In Bash, the while construct allows you to execute a specific block of code repeatedly as long as a certain condition is true. It's commonly used for creating loops in Bash scripts.

Which command can be used in a shell script to introduce a delay, often used for debugging or to pause the execution?

  • sleep
  • wait
  • pause
  • delay
The sleep command is used in a shell script to introduce a delay. You specify the number of seconds to pause the script's execution. It's commonly used for debugging to observe intermediate results or to add pauses for various purposes.

To execute a script in Bash, you often need to make it executable and then use the ________ symbol before the script name.

  • ./
  • &
  • ~
  • $
To execute a script in Bash, you often need to make it executable by running chmod +x script_name, and then you use the ./ symbol before the script name to specify the current directory. This tells the shell to execute the script from the current directory.

Which command is used to view the list of scheduled tasks for the system?

  • cronlist
  • crontab -l
  • schedulelist
  • tasks
The command "crontab -l" is used to view the list of scheduled tasks (cron jobs) for the system. It lists the cron entries for the currently logged-in user. Scheduled tasks are used to automate various processes at specific times or intervals in a Linux system.

To restrict users from logging in via SSH, you would modify the ________ file.

  • /etc/ssh/sshd_config
  • /etc/ssh/ssh_config
  • /etc/sshd/ssh_config
  • /etc/ssh/sshd
To restrict users from logging in via SSH, you would modify the /etc/ssh/sshd_config file. This file contains configuration options for the SSH server, and you can specify access restrictions and settings here.