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.
Which tool enforces mandatory access controls at the kernel level in Linux?
- SELinux
- AppArmor
- UAC
- sudo
SELinux (Security-Enhanced Linux) enforces mandatory access controls at the kernel level in Linux. It provides a powerful and flexible security framework that allows administrators to define fine-grained access policies for processes, files, and resources on a system.
The ___________ distribution is known for its advanced package management system called "pacman."
- Arch
- CentOS
- Fedora
- Ubuntu
The Arch distribution is known for its advanced package management system called "pacman." Arch Linux uses a rolling release model and the pacman package manager for installing, updating, and managing software packages.
What is the primary protocol used by NFS for sharing files?
- NFS
- SMB
- HTTP
- FTP
The primary protocol used by NFS (Network File System) for sharing files is NFS itself. NFS is a network protocol specifically designed for sharing files and directories among networked computers. It is commonly used in Unix and Linux environments.
Which of the following is a valid way to declare a variable in Bash?
- myVar=42
- $myVar = 42
- var myVar = 42
- set myVar 42
A valid way to declare a variable in Bash is by using the format 'myVar=42'. This assigns the value 42 to the variable 'myVar'. The '$' symbol is used to reference the variable.
What is the purpose of the $? variable in a shell script?
- It represents the process ID of the script.
- It stores the script's exit status.
- It contains the script's standard input.
- It holds the current working directory of the script.
The purpose of the $? variable in a shell script is to store the script's exit status. A value of 0 typically indicates success, while non-zero values indicate different types of errors or failures. This is essential for error checking and script control flow.
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.
Which service in Linux is responsible for resolving domain names to IP addresses?
- DNS (Domain Name System)
- DHCP (Dynamic Host Configuration Protocol)
- SNMP (Simple Network Management Protocol)
- SMTP (Simple Mail Transfer Protocol)
The service responsible for resolving domain names to IP addresses in Linux is the DNS (Domain Name System). DNS servers maintain a database of domain name-to-IP address mappings and help in translating human-readable domain names to numeric IP addresses, enabling network communication.