The sudo command reads configurations from _________ to determine user privileges.
- /etc/passwd
- /etc/group
- /etc/sudoers
- /var/log/auth.log
The sudo command reads configurations from /etc/sudoers to determine user privileges. This file contains information about which users can run commands with administrative privileges and under what conditions. Understanding and configuring the sudoers file is essential for managing access control in Linux.
You've just set up a new Linux server and need to install a web server. Which package management command would you likely use in a Debian-based system?
- apt-get
- yum
- dnf
- pacman
In a Debian-based system, such as Ubuntu, you would likely use the 'apt-get' command to install packages. The 'apt-get' command is used for package management and is specifically designed for Debian-based distributions.
In a shell script, if you want to refer to the last argument passed, you would use the _________ special variable.
- $!
- $@
- $?
- $_
In a shell script, you would use the $_ special variable to refer to the last argument passed. This variable holds the last argument to the last command that was executed.
The default field separator for operations like splitting strings is determined by the _________ built-in variable.
- IFS
- SHELL
- PATH
- PWD
The default field separator for operations like splitting strings is determined by the IFS (Internal Field Separator) built-in variable. The IFS variable defines how the shell separates words when it parses strings, making it a crucial component for tasks like parsing CSV files or text processing in scripts.
You've been tasked to lockdown a specific application on an Ubuntu server. You decide to use a tool that restricts programs to a limited set of resources. Which tool would you primarily utilize?
- AppArmor
- SELinux
- UFW
- Grsecurity
To lockdown a specific application on an Ubuntu server by restricting it to a limited set of resources, you would primarily utilize "AppArmor." AppArmor is a Mandatory Access Control (MAC) framework that allows you to define and enforce application-specific security policies, confining applications to their designated resources and actions.
During the boot process, the ________ is responsible for loading the kernel into memory.
- bootloader
- init system
- BIOS/UEFI
- kernel
During the boot process, the BIOS/UEFI (Basic Input/Output System/Unified Extensible Firmware Interface) is responsible for loading the kernel into memory. The BIOS/UEFI is the firmware that initializes the hardware and starts the boot process. It locates the bootloader, which, in turn, loads the kernel into memory to start the operating system.
What is the primary purpose of the /home directory in Linux?
- Storing system binaries
- Storing system configuration files
- Storing temporary files
- Storing user home directories
The primary purpose of the /home directory in Linux is to store user home directories. Each user on a Linux system typically has a subdirectory within /home where their personal files and settings are stored.
Which command tests for file types and compares values in Bash scripting?
- test
- eval
- exec
- check
In Bash scripting, the test command is used to test for file types and compare values. It is often used with conditional statements like if and elif to perform tests on files, strings, and other expressions. The test command is also equivalent to [ ] in Bash.
A company wants to deploy a microservices architecture for their application. They are looking for a technology that can package each service with its dependencies and configuration in a reproducible way. Which technology would best fit this requirement?
- Docker
- Kubernetes
- Vagrant
- Helm
Docker is a technology that allows you to package applications and their dependencies into containers. It's an excellent choice for deploying microservices, as it ensures that each service is encapsulated with its dependencies and configurations, making it highly reproducible and scalable.
The _________ command provides a bird's-eye view of the system's current resource usage, including CPU, RAM, and swap.
- top
- ps
- ls
- sysstat
The top command provides a bird's-eye view of the system's current resource usage, including CPU, RAM, and swap. It offers real-time monitoring of processes and their resource consumption.
After implementing a new SELinux policy, a certain application fails to work. To troubleshoot, you decide to temporarily change SELinux mode. Which mode allows everything but logs violations?
- Permissive mode
- Enforcing mode
- Disabled mode
- Audit mode
To temporarily change SELinux mode and allow everything while logging violations, you would use the "Permissive" mode. In this mode, SELinux will log policy violations but won't enforce them, which helps troubleshoot and analyze any issues without blocking the application.
Which command allows you to change directories in the terminal?
- cat
- cd
- ls
- pwd
The cd command is used to change directories in the terminal. It stands for "change directory," and it is essential for navigating the Linux file system. You can use it to move between different directories or folders.