How can a user put a running process into the background from the terminal?
- Press Ctrl + Z
- Press Ctrl + B
- Press Ctrl + C
- Press Ctrl + D
To put a running process into the background from the terminal, you can press Ctrl + Z. This action suspends the process and places it in the background, allowing you to continue using the terminal for other tasks while the process runs in the background.
You've been given a task to review the startup scripts of a system. Where would you primarily look to find the initialization scripts for different run levels?
- /etc/init.d
- /etc/rc.d
- /etc/runlevels
- /usr/bin/init
To find the initialization scripts for different run levels, you would primarily look in the /etc/init.d directory. This directory contains the scripts and links used for managing services and their run levels on a Linux system.
LXC provides a similar containerization service as Docker, but it is more focused on providing a full ________ environment.
- Kernel
- Networking
- System
- User
LXC (Linux Containers) provides a similar containerization service as Docker, but it is more focused on providing a full system environment. This means it can run multiple Linux distributions and even non-Linux operating systems with their own kernel, making it more flexible for certain use cases.
Which directory in Linux is often used for mounting temporary file storage systems, like USB drives?
- /media
- /mnt
- /tmp
- /var
The /media directory in Linux is often used for mounting temporary file storage systems, like USB drives. When you plug in a USB drive, it's commonly mounted under the /media directory for easy access.
Imagine you're setting up a new server. You want to ensure that every user on the system has their own private space for files and data. Which directory structure in Linux helps facilitate this?
- /etc
- /home
- /tmp
- /var
To provide each user with their own private space for files and data, you would use the /home directory structure in Linux. User home directories are typically located within /home, and this separation ensures user privacy and data security.
You've been tasked to ensure a specific service always restarts after failure. Which Linux system would you primarily use to achieve this?
- Systemd
- SysV Init
- Upstart
- OpenRC
To ensure that a specific service always restarts after failure in Linux, you would primarily use Systemd. Systemd is a modern init system that provides a feature-rich service management system and includes options for service restarts and recovery after failure.
While configuring a VPN on a Linux server, you're asked to ensure that the VPN supports both L2TP and IPsec. Which software solution would you likely consider?
- OpenVPN
- StrongSwan
- WireGuard
- PPTP
To support both L2TP and IPsec in a VPN setup, you would likely consider using StrongSwan. StrongSwan is an open-source IPsec-based VPN solution that supports both L2TP and IPsec, providing secure and reliable VPN connectivity.
The set -x command in a shell script is used to enable __________ for debugging purposes.
- Debugging mode
- Profiling mode
- Tracing mode
- Script execution
The set -x command in a shell script is used to enable debugging mode for debugging purposes. When this mode is activated, the shell script will display each command before it is executed, making it useful for tracking the script's execution and finding errors.
Which operator would you use in Bash to check if two strings are equal?
- =
- ==
- #NAME?
- equals
In Bash, to check if two strings are equal, you use the == operator. It is used in conditional statements to compare two strings. Remember to enclose the strings in double square brackets for the comparison, like [[ string1 == string2 ]].
The _________ special variable in a shell script provides an option for random number generation.
- $RANDOM
- $PID
- $USER
- $HOME
The $RANDOM special variable in a shell script provides an option for random number generation. You can use $RANDOM to generate random integers within a specific range. It's commonly used for tasks like creating random passwords or simulating randomness in scripts.
What is the primary purpose of the chmod command in Linux?
- Changing file permissions
- Creating new directories
- Deleting files
- Displaying file contents
The primary purpose of the chmod command in Linux is to change file permissions. It allows you to modify the access permissions of files and directories. You can use it to control who can read, write, and execute a particular file or directory.
Docker primarily deals with which kind of virtualization?
- Containerization
- Hypervisor-based virtualization
- Paravirtualization
- Emulation
Docker primarily deals with containerization, which is a lightweight form of virtualization. Containers share the host OS kernel, making them efficient and suitable for packaging and running applications.