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.
The tool ________ is used to manage and enforce profiles within AppArmor.
- aa-status
- apparmor-status
- aa-enforce
- apparmor-enforce
The tool aa-enforce is used to manage and enforce profiles within AppArmor. It allows you to enable and enforce AppArmor profiles for specific applications or processes.
In Linux, user-specific configuration files, sometimes starting with a dot (.), are typically located in the _________ directory.
- /bin
- /etc
- /home
- /usr
In Linux, user-specific configuration files, sometimes starting with a dot (.), are typically located in the /home directory. Each user has a home directory under /home where they can store their personalized configuration files and data.
In Red Hat-based systems, the ________ utility is used to manage and configure software repositories.
- yum
- apt-get
- dnf
- zypper
In Red Hat-based systems, the "yum" utility (Yellowdog Updater, Modified) is used to manage and configure software repositories. It allows users to install, update, and remove packages from Red Hat-based distributions.
When a process is neither in 'running' nor in 'blocked' state, which state might it be in?
- Waiting
- Zombie
- Sleeping
- Stopped
When a process is neither in the 'running' nor 'blocked' state, it is typically in a 'Sleeping' state. In this state, the process is waiting for an event or a specific condition to occur before it can continue execution. The process is temporarily inactive, often due to I/O operations or waiting for a signal.
Which command in Linux is commonly used to manage and update user passwords?
- passwd
- chmod
- ls
- cp
The correct command to manage and update user passwords in Linux is 'passwd.' It allows users to change their own passwords or allows administrators to manage user accounts. The 'passwd' command interacts with the /etc/shadow file to update password information securely.
When a script is not behaving as expected, you can add the _________ option at the top of the script to display each command before it's executed.
- set -x
- debug -on
- trace -all
- verbose -true
When a script is not behaving as expected, you can add the set -x option at the top of the script to display each command before it's executed. This is a valuable debugging technique that helps you identify issues in your script by showing each command as it is processed.
Which of the following is a common method to secure SSH beyond just password authentication?
- Enforcing key-based authentication
- Using a weak password
- Disabling SSH
- Keeping SSH configuration default
A common method to secure SSH beyond just password authentication is to enforce key-based authentication. This method increases security by requiring users to possess a private key in addition to their password, making it much more difficult for unauthorized users to access the system.
You are writing a script that requires parsing command-line options with both short and long formats. Which command would you likely use?
- getopts
- getopt
- parseargs
- getoptlong
You would likely use the getopt command to parse command-line options with both short and long formats. getopt is a versatile command for handling command-line arguments and options in shell scripts, allowing you to specify both short and long options.
QEMU can be used for hardware emulation, but when paired with KVM, it leverages _________ virtualization for better performance.
- Hardware
- Software
- Hypervisor
- Full
QEMU, when paired with KVM (Kernel-based Virtual Machine), leverages "hardware" virtualization for better performance. Hardware virtualization allows the virtual machine to directly access the physical hardware, resulting in improved performance compared to software emulation.