To diagnose potential issues with domain name resolution, you might use the ________ command.
- nslookup
- ifconfig
- ping
- dig
To diagnose potential issues with domain name resolution, you might use the "dig" command. "dig" (Domain Information Groper) is a powerful command-line tool for querying DNS (Domain Name System) servers and obtaining detailed information about DNS records and name resolution, making it useful for troubleshooting DNS-related problems.
In terms of file permissions, what does the "s" stand for when seen in a permission string like "drwxr-sr-x"?
- Set user or group ID
- Special permissions
- Sticky bit
- Synchronized access
The "s" in a permission string like "drwxr-sr-x" signifies the "Set user or group ID" permission. When set on an executable file, it allows the user who runs the file to temporarily inherit the permissions of the file's owner or group, depending on where it's set (user or group ID).
In the context of performance tuning, what does the 'vm.swappiness' parameter control?
- The balance between swapping out and caching application data
- The number of processes a user can start
- The kernel's version number
- The I/O scheduler used by the system
The 'vm.swappiness' parameter controls the balance between swapping out and caching application data in Linux. It determines how often the system will swap data from RAM to disk and vice versa. A lower value (e.g., 0) keeps more data in RAM, while a higher value (e.g., 100) swaps data out more aggressively.
For optimizing database performance, you might adjust the __________ parameter to control disk caching behavior.
- vm.dirty_ratio
- ifconfig
- lsusb
- grep
For optimizing database performance, you might adjust the vm.dirty_ratio parameter to control disk caching behavior. This parameter in the sysctl settings defines the percentage of system memory that can be filled with dirty data pages before the kernel starts writing them to disk, which can impact database I/O performance.
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.
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.