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.
Which daemon is responsible for network interface configuration and automatic switching between networks?
- NetworkManager
- SystemD
- ifconfig
- Apache
NetworkManager is responsible for network interface configuration and automatic switching between networks in Linux. It simplifies network setup and management, making it easier for users to connect to different networks seamlessly.
What does the 2>&1 notation signify when used in Linux command redirection?
- Closes both standard error and standard output
- Redirects both standard error (2) and standard output (1) to the same location
- Redirects standard error (2) to standard output (1)
- Redirects standard output (1) to standard error (2)
The "2>&1" notation signifies that both standard error (file descriptor 2) and standard output (file descriptor 1) are redirected to the same location. This is commonly used to capture both error messages and regular output when running commands.
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.