Kernel modules that are loaded during the boot process are typically defined in the _________ directory.
- /lib/modules
- /boot
- /etc/kernel
- /var/modules
The correct option is /lib/modules. Kernel modules (device drivers and other kernel extensions) that are loaded during the boot process are typically defined in the /lib/modules directory. This directory contains subdirectories for different kernel versions and modules specific to those versions.
In the context of file systems, what does "journaling" primarily help with?
- Ensuring file system consistency
- Enhancing file compression
- Improving file access speed
- Optimizing file permissions
Journaling in file systems primarily helps ensure file system consistency. It records changes to the file system in a journal, which can be used to recover the file system in case of a crash or unexpected system shutdown, preventing data corruption.
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 phase of the Linux boot process is responsible for hardware detection and initial setup?
- Init
- BIOS/UEFI
- GRUB
- Initrd
The Initrd (Initial RAM Disk) phase of the Linux boot process is responsible for hardware detection and initial setup. It loads essential modules and drivers needed to mount the root file system and continue the boot process.
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.