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.
Which command allows you to change the expiration date of a user's password in Linux?
- chage
- passwd
- usermod
- pwm
The chage command in Linux allows you to change the expiration date of a user's password. It provides a range of options to manage password-related settings, including password expiration.
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.
Which command is used to monitor and manipulate IP traffic control settings?
- tc
- ipconfig
- iptables
- arp
The tc command is used to monitor and manipulate IP traffic control settings in Linux. It allows you to manage Quality of Service (QoS), bandwidth, and traffic shaping on network interfaces, making it a crucial tool for network administrators.
The primary configuration file for setting up static routes on a Linux system is ________.
- /etc/network/interfaces
- /etc/routes
- /etc/network/routing
- /etc/sysconfig/network
The primary configuration file for setting up static routes on a Linux system is "/etc/network/interfaces." This file is used to define static routes, including the destination network, gateway, and netmask.
For an SSH server, the main configuration file is found at /etc/ssh/________.
- sshd_config
- server.conf
- ssh_config
- main.conf
For an SSH server, the main configuration file is found at /etc/ssh/**sshd_config**. This file contains various settings for the SSH server, including authentication methods, allowed users, and more.
In shell scripting, a loop that processes each item in a list one by one is known as a _________ loop.
- for
- while
- until
- foreach
In shell scripting, a loop that processes each item in a list one by one is known as a for loop. The "for" loop allows you to iterate through a list of items, such as files or elements in an array, and perform actions on each item. It's a fundamental construct for automation and scripting tasks.
Which file in Linux would you edit to set a system's DNS resolver addresses?
- /etc/resolv.conf
- /etc/hostname
- /etc/dns.conf
- /etc/networks
To set a system's DNS resolver addresses in Linux, you would edit the /etc/resolv.conf file. This file contains the IP addresses of the DNS servers that the system should use for domain name resolution.