If you want to store the exit status of a command in a variable, you would typically use the _________ built-in variable.
- $?
- $!
- $#
- $@
If you want to store the exit status of a command in a variable, you would typically use the $? built-in variable. The $? variable contains the exit status of the last command executed, where 0 usually indicates success, and non-zero values indicate an error or failure.
The systemctl command is primarily used to control the _________ system and service manager.
- Systemd
- Init
- Upstart
- SysV
The systemctl command is primarily used to control the "systemd" system and service manager. Systemd is the init system in most modern Linux distributions, responsible for managing system processes and services, making it an essential tool for system administrators.
When setting up SSH for the first time, the server-side cryptographic keys are stored in the /etc/ssh/________ directory.
- ssh_keys
- certs
- ssh_host_keys
- crypto
When setting up SSH for the first time, the server-side cryptographic keys are stored in the /etc/ssh/ssh_host_keys directory. These keys are crucial for secure SSH communication.
What does the ifconfig command primarily display?
- Network interface information
- System uptime
- List of installed packages
- CPU usage statistics
The ifconfig command primarily displays network interface information. It shows details about all network interfaces on the system, such as their IP addresses, MAC addresses, and network configuration settings. This command is essential for managing and configuring network interfaces in Linux.
For debugging purposes, how can you set a breakpoint in a shell script?
- Using the set -e command
- Inserting the line # breakpoint in the script
- Using the break command
- Setting a variable to DEBUG=true
To set a breakpoint in a shell script, you can insert the line # breakpoint in the script. When the script runs, it will stop execution at this line, allowing you to inspect variables and step through code for debugging purposes.
Which component of the Linux system manages process scheduling?
- Scheduler
- Memory Manager
- File System
- Kernel
The component of the Linux system that manages process scheduling is the Scheduler. The scheduler is responsible for determining the order in which processes are executed on the CPU, ensuring efficient and fair utilization of system resources.
What command in Linux provides a dynamic real-time view of the system's running processes?
- top
- ls
- ps
- df
The 'top' command in Linux provides a dynamic, real-time view of the system's running processes. It displays information about CPU usage, memory usage, and more. 'top' is a powerful tool for monitoring system performance and identifying resource-intensive processes.
In the context of disk partitions, what does LVM stand for?
- Logical Volume Manager
- Linux Virtual Machine
- Large Volume Memory
- Logical Virtual Machine
In the context of disk partitions, LVM stands for "Logical Volume Manager." LVM is a technology that allows for flexible management of disk space in Linux. It enables features like dynamic resizing, snapshots, and the creation of logical volumes that span multiple physical disks. LVM is a crucial tool for efficiently managing storage in complex Linux environments.
Which Linux distribution has a rolling release update model and is known for its simplicity?
- Arch Linux
- CentOS
- Fedora
- Slackware
Arch Linux is a Linux distribution known for its rolling release update model and simplicity. In a rolling release, software updates are continuously provided, and users do not need to reinstall the entire system for major updates. Arch Linux allows for a highly customizable and minimalistic Linux environment.
To disable the debugging mode that was enabled with set -x, you can use the command __________.
- set +x
- debug off
- stop debug
- quit
To disable the debugging mode that was enabled with set -x, you can use the command **set +x**. This command turns off the debugging mode, so the script will no longer display each command before execution. It's a useful way to end debugging when it's no longer needed.