To see the history of commands executed in the terminal, you would use the ________ command.
- history
- list
- log
- trace
To see the history of commands executed in the terminal, you would use the "history" command. This command displays a list of previously executed commands, making it easier to re-run or recall commands that were used in the past.
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.
Which Linux command can be used to enforce password policies and aging?
- passwd
- chage
- pam-config
- usermod
The chage command in Linux is used to enforce password policies and aging. It allows system administrators to set password expiration, minimum and maximum password age, and other security-related settings for user accounts. This helps enhance the security of the system by ensuring that passwords are regularly updated.
For a package manager, what is the significance of the "dependency resolution" process?
- It ensures that all required libraries and packages are installed to support a software package.
- It removes unnecessary packages from the system to save space.
- It creates a backup of installed packages.
- It updates the package manager's metadata.
The "dependency resolution" process in a package manager is significant because it ensures that all required libraries and packages are installed to support a software package. It helps in managing complex software dependencies and makes sure that a package can function properly without missing components.
What is the primary function of kernel modules in Linux?
- Extend the functionality of the Linux kernel
- Manage user accounts
- Create GUI interfaces
- Manage system configuration files
Kernel modules in Linux extend the functionality of the Linux kernel. They allow you to add or remove functionality from the kernel without the need to reboot the system. Kernel modules are a key mechanism for adding device drivers, file systems, and other essential functionalities to the kernel.