What is the primary purpose of the groupmod command in Linux?

  • Modify group attributes
  • Add a new group
  • Remove a user from a group
  • Create a new group
The primary purpose of the groupmod command in Linux is to modify group attributes. You can use groupmod to change properties of an existing group, such as its name or GID (Group ID). It does not create new groups or remove users from groups; it focuses on group attribute modifications.

You're given a Dockerfile and need to create a Docker container from it. Which command would you use?

  • docker compose
  • docker build
  • docker create
  • docker run
To create a Docker container from a Dockerfile, you would use the "docker build" command. This command reads the instructions in the Dockerfile and generates a Docker image, which can then be used to create and run containers.

The ________ command in Linux provides a detailed view of the networking subsystem, including interfaces, IP addresses, and routing tables.

  • ipconfig
  • netstat
  • ifconfig
  • ip
The "ip" command in Linux provides a detailed view of the networking subsystem, including information about network interfaces, IP addresses, routing tables, and more. It is a versatile tool for configuring and managing network settings on a Linux system, making it an essential utility for network administrators and troubleshooters.

The __________ phase of the Linux boot process is where the system checks and mounts file systems.

  • initrd
  • GRUB
  • LILO
  • init
The initrd phase of the Linux boot process is where the system checks and mounts file systems. The initial RAM disk (initrd) is used during the boot process to provide an initial file system that's used as a temporary root file system before the actual root file system is mounted. It contains necessary drivers and tools to get the system to the point where it can transition to the real root file system.

In terms of file permissions, what does the "s" stand for when seen in a permission string like "drwxr-sr-x"?

  • Set user or group ID
  • Special permissions
  • Sticky bit
  • Synchronized access
The "s" in a permission string like "drwxr-sr-x" signifies the "Set user or group ID" permission. When set on an executable file, it allows the user who runs the file to temporarily inherit the permissions of the file's owner or group, depending on where it's set (user or group ID).

In the context of performance tuning, what does the 'vm.swappiness' parameter control?

  • The balance between swapping out and caching application data
  • The number of processes a user can start
  • The kernel's version number
  • The I/O scheduler used by the system
The 'vm.swappiness' parameter controls the balance between swapping out and caching application data in Linux. It determines how often the system will swap data from RAM to disk and vice versa. A lower value (e.g., 0) keeps more data in RAM, while a higher value (e.g., 100) swaps data out more aggressively.

For optimizing database performance, you might adjust the __________ parameter to control disk caching behavior.

  • vm.dirty_ratio
  • ifconfig
  • lsusb
  • grep
For optimizing database performance, you might adjust the vm.dirty_ratio parameter to control disk caching behavior. This parameter in the sysctl settings defines the percentage of system memory that can be filled with dirty data pages before the kernel starts writing them to disk, which can impact database I/O performance.

Kernel modules that are loaded during the boot process are typically defined in the _________ directory.

  • /lib/modules
  • /boot
  • /etc/kernel
  • /var/modules
The correct option is /lib/modules. Kernel modules (device drivers and other kernel extensions) that are loaded during the boot process are typically defined in the /lib/modules directory. This directory contains subdirectories for different kernel versions and modules specific to those versions.

In the context of file systems, what does "journaling" primarily help with?

  • Ensuring file system consistency
  • Enhancing file compression
  • Improving file access speed
  • Optimizing file permissions
Journaling in file systems primarily helps ensure file system consistency. It records changes to the file system in a journal, which can be used to recover the file system in case of a crash or unexpected system shutdown, preventing data corruption.

In a situation where you'd want to deny a user from running specific commands as root, you would modify their entry in the _________ file.

  • sudoers
  • shadow
  • passwd
  • groups
In a situation where you want to deny a user from running specific commands as root, you would modify their entry in the sudoers file. This file contains rules and permissions for granting or denying superuser privileges to users and groups.