Which loop in shell scripting tests the condition before executing the body of the loop?

  • while
  • for
  • until
  • do-while
The while loop in shell scripting tests the condition before executing the body of the loop. It will repeatedly execute the loop body as long as the specified condition remains true.

What is the primary keyword to start a loop that will iterate a fixed number of times in shell scripting?

  • for
  • while
  • repeat
  • loop
The primary keyword to start a loop that will iterate a fixed number of times in shell scripting is for. The for loop allows you to specify the number of iterations and is commonly used for such purposes.

You are setting up a new server and need to ensure that only specific users can SSH into the machine. Which configuration file would you modify to achieve this?

  • /etc/ssh/sshd_config
  • /etc/hosts.allow
  • /etc/ssh/authorized_keys
  • /etc/passwd
To restrict SSH access to specific users, you would modify the /etc/ssh/sshd_config file. This file contains the configuration options for the SSH server, including settings related to user access, authentication, and permissions.

In the context of containers, what does the acronym "OCI" stand for?

  • Open Container Initiative
  • Open Container Image
  • Overarching Container Integration
  • Operating Container Infrastructure
In the context of containers, "OCI" stands for the "Open Container Initiative." OCI is a standardized and open industry effort that defines container specifications and runtime standards, ensuring compatibility and portability between different container runtimes.

The _________ utility is used to create, grow, shrink, and repair ext2, ext3, and ext4 file systems.

  • resize2fs
  • mkfs
  • df
  • lsblk
The correct option is resize2fs. The resize2fs utility is used to resize (grow or shrink) ext2, ext3, and ext4 file systems. It allows you to adjust the size of the file system to match the size of the underlying disk or partition. This is a crucial tool for managing file system sizes in Linux.

The ________ command in Linux allows you to enforce a user to change their password upon the next login.

  • passwd
  • chsh
  • chfn
  • usermod
The "passwd" command in Linux allows you to enforce a user to change their password upon the next login. This is often used for security reasons, such as when a user's password has expired.

protocol is considered to be highly secure and is commonly used in Linux?

  • OpenVPN
  • PPTP
  • L2TP
  • IPSec
OpenVPN is considered highly secure and commonly used in Linux. It's an open-source VPN protocol that provides strong encryption and is widely trusted for creating secure network connections.

You are debugging an application and need to trace the system calls it makes. Which tool in Linux would you employ?

  • strace
  • ltrace
  • gdb
  • valgrind
To trace the system calls made by an application on Linux, you would use the strace tool. It provides detailed information about the system calls, signals, and other interactions the application has with the operating system, which is valuable for debugging and analysis.

The _________ command in Linux can be used to manipulate or display IP routing tables.

  • route
  • ifconfig
  • iptables
  • ip
The ip command in Linux can be used to manipulate or display IP routing tables. It's a powerful and versatile tool for configuring network interfaces, routes, tunnels, and more. Unlike older commands like route and ifconfig, ip is considered a modern and more comprehensive replacement.

In Linux, the _____ command is used to display the status of jobs in the current session.

  • jobs
  • top
  • ps
  • tasklist
In Linux, the jobs command is used to display the status of jobs in the current session. It provides information about background processes or jobs started within the current shell session.

The _________ feature in btrfs allows for creating a readable/writable "snapshot" of a subvolume.

  • snapshot
  • backup
  • mirroring
  • subvolume copy
The correct option is snapshot. Btrfs, a modern file system for Linux, provides a feature that allows for creating a readable/writable "snapshot" of a subvolume. Snapshots are a powerful tool for data protection and efficient use of disk space.

Which system in Linux allows for the management and supervision of service daemons?

  • systemd
  • SysV init
  • GRUB
  • iptables
systemd is the system in Linux that allows for the management and supervision of service daemons. It's a modern initialization system and service manager that replaces the traditional SysV init. systemd provides enhanced control and monitoring of services and system initialization.