If you need to view the route taken by packets to reach a network host, which command would you use?

  • traceroute
  • ifconfig
  • netstat
  • ping
To view the route taken by packets to reach a network host, you would use the traceroute command. Traceroute provides a detailed path analysis of how packets traverse the network, including the IP addresses of each hop and response times. It's a valuable tool for diagnosing network issues.

What is the first program run by the Linux kernel when it starts?

  • init
  • shell
  • bootloader
  • BIOS/UEFI
The first program run by the Linux kernel when it starts is typically the init program (or its modern replacement, such as systemd). Init is responsible for initializing the system, starting services, and setting up the user environment.

After a recent system update, your Linux server fails to boot properly. It seems to hang after the bootloader phase. Where would you begin troubleshooting to identify the issue?

  • Initiate a rescue mode
  • Check the system logs in /var/log
  • Run a hardware diagnostic tool
  • Reinstall the operating system
When a Linux server fails to boot after an update, you should begin troubleshooting by checking the system logs in /var/log. Specifically, you can look at logs such as /var/log/syslog and /var/log/boot.log to identify any error messages or issues that occurred during the boot process.

In the context of iptables, what is the purpose of the INPUT chain?

  • Processing incoming packets destined for the local system
  • Forwarding packets between network interfaces
  • Handling outgoing packets from the local system
  • Redirecting traffic to a specific port
In the context of iptables, the INPUT chain is responsible for processing incoming packets destined for the local system. This is where rules for packets directed at the firewall-hosted services and applications are defined, allowing or blocking them based on the rules configured in the chain.

How do you denote the start of a block of code in a Bash if statement?

  • then
  • start
  • begin
  • do
In a Bash if statement, you denote the start of a block of code with the keyword then. This is where the code to be executed if the condition is true begins. It's important to follow then with the code that should be executed when the condition is met.

To iterate over a range of numbers in a loop, one might use the seq command combined with the _________ loop.

  • for
  • while
  • until
  • numeric
To iterate over a range of numbers in a loop, one might use the seq command combined with the for loop. The seq command generates a sequence of numbers, and the "for" loop can be used to loop through these numbers, allowing you to perform actions on each number within the specified range. This is a common technique in shell scripting for tasks like counting or iterating through numerical data.

Which command is used to grant temporary elevated privileges in Linux?

  • sudo
  • su
  • elevate
  • grant
The correct command to grant temporary elevated privileges in Linux is sudo, which stands for "superuser do." The sudo command allows authorized users to execute a command as the superuser or another user, providing a level of access control.

Which technology allows for OS-level virtualization, resulting in multiple isolated user-space instances?

  • Containers
  • Virtual Machines
  • Hypervisor
  • KVM
Containers enable OS-level virtualization, allowing multiple isolated user-space instances to run on the same kernel. They share the host OS's kernel but have separate user spaces, making them lightweight and efficient. Docker and Kubernetes are popular container technologies.

What is the primary use of the iptables -L command?

  • Viewing the current rules in the iptables firewall
  • Listing installed packages
  • Listing contents of a directory
  • Listing system users
The primary use of the iptables -L command is to view the current rules in the iptables firewall. It shows a list of firewall rules and their details, allowing you to inspect how traffic is being filtered or forwarded on a Linux system.

Which tool is commonly used to manage btrfs file systems?

  • btrfs-progs
  • ext4tools
  • xfsctl
  • jfsutils
The tool commonly used to manage btrfs file systems is btrfs-progs. These utilities provide various commands for managing and maintaining btrfs file systems, including creating, mounting, and checking file systems.

Which command is used to load kernel modules manually?

  • modprobe
  • insmod
  • depmod
  • lsmod
The correct command to load kernel modules manually is insmod. This command allows you to insert a kernel module into the running kernel. It's used when you want to load a specific module into the kernel, and it doesn't handle module dependencies automatically.

Which daemon in Linux is responsible for logging system messages?

  • syslogd
  • klogd
  • systemd
  • auditd
In Linux, the syslogd daemon is responsible for logging system messages. It collects and manages log messages generated by various system components and services. klogd is used for kernel log messages, systemd is an init system, and auditd is responsible for auditing.