Which SSH configuration parameter specifies the maximum number of authentication attempts allowed per connection?
- MaxLoginAttempts
- MaxAuthTries
- AuthMaxRetries
- LoginAttempts
The SSH configuration parameter that specifies the maximum number of authentication attempts allowed per connection is MaxAuthTries. It can be set in the SSH server configuration file (sshd_config) to enhance security by limiting the number of failed login attempts.
Which built-in variable in a shell script would you use to determine the number of positional parameters?
- $#
- $@
- $*
- $$
To determine the number of positional parameters passed to a shell script, you would use the built-in variable $#. It represents the count of arguments supplied to the script.
In Bash scripting, the ________ command is used to loop over a range of values.
- for
- while
- if
- echo
In Bash scripting, the for command is used to loop over a range of values. It allows you to execute a set of commands for each item in the specified range or list.
Which command provides information about the network connections, routing tables, and network interface statistics?
- netstat
- ping
- ifconfig
- traceroute
The 'netstat' command provides information about network connections, routing tables, and network interface statistics. It's a powerful utility for diagnosing network-related issues and displaying network statistics and connections.
A kernel that can have modules loaded and unloaded at runtime is referred to as a _________ kernel.
- modular
- dynamic
- monolithic
- micro
A kernel that can have modules loaded and unloaded at runtime is referred to as a "modular" kernel. In a modular kernel, certain functionality can be added or removed via loadable kernel modules, making it more flexible and efficient.
What role does the virt-manager tool play in Linux virtualization?
- Graphical tool for managing virtual machines
- Command-line tool for system administration
- Kernel module for virtualization
- Web server for virtual machine deployment
virt-manager is a graphical tool for managing virtual machines in Linux. It provides a user-friendly interface to create, configure, and manage virtual machines using various virtualization technologies, including KVM and QEMU.
Which Linux utility allows you to monitor and manage system CPU performance?
- top
- ls
- cpustat
- sysadmin
The 'top' command is a Linux utility that allows you to monitor and manage system CPU performance. It provides a real-time view of system processes, CPU usage, memory usage, and more. You can use it to identify resource-intensive processes and manage system performance.
You've written a script that processes a list of files. You want to ensure that even if a filename contains spaces, it's treated as a single argument. Which built-in variable should you modify?
- IFS (Internal Field Separator)
- PS1 (Prompt String 1)
- OIFS (Original Internal Field Separator)
- FS (Field Separator)
To ensure that filenames with spaces are treated as single arguments in a script, you should modify the OIFS (Original Internal Field Separator) variable. This allows you to temporarily change the IFS value to a specific character (e.g., newline) and then restore it to its original value after processing the filenames. This ensures that spaces don't break the filenames into multiple arguments.
Which file in the /proc directory can be inspected to gather information about the system's CPU?
- /proc/cpuinfo
- /proc/meminfo
- /proc/filesystems
- /proc/sys/kernel
The /proc/cpuinfo file in the /proc directory is used to gather information about the system's CPU. It provides details about the processor, including its model, speed, and features. This is a valuable resource for understanding the CPU's capabilities and characteristics.
What is the primary distinction between top and htop when monitoring system processes?
- top is a basic system monitoring tool, while htop is an advanced alternative.
- top displays real-time data, while htop provides more interactivity and customization.
- top is text-based, while htop offers a graphical interface.
- top shows memory usage, while htop focuses on CPU usage.
The primary distinction between top and htop is that top displays real-time data about system processes, whereas htop provides more interactivity and customization. htop allows users to sort and filter processes, view detailed information, and easily send signals to processes directly from the interface. While both tools show similar information, htop offers a more user-friendly and feature-rich experience for process monitoring.
A system administrator wants to dynamically alter the kernel's behavior without rebooting. What feature of the Linux kernel allows for this?
- Sysctl
- init.d
- Kernel Modules
- Udev
The Sysctl feature allows a system administrator to dynamically alter the kernel's behavior without rebooting. It provides a way to modify kernel parameters at runtime, making it a powerful tool for fine-tuning system behavior.
In Linux, services that are set to restart automatically after a failure are said to be "_________".
- Resilient
- Autorestart
- Persistent
- Robust
In Linux, services that are set to restart automatically after a failure are said to be "Autorestart." This feature ensures that critical services can recover from failures and continue running, enhancing system reliability and availability.