The command used to resize the filesystem on a partition in Linux is _________.

  • resize2fs
  • mv
  • chmod
  • cp
The command used to resize the filesystem on a partition in Linux is resize2fs. This command is used after resizing a partition to adjust the filesystem to use the newly available space.

Which file in Linux is used to set the hostname and the order in which the system resolves addresses?

  • /etc/hostname
  • /etc/hosts
  • /etc/resolv.conf
  • /etc/networks
The /etc/hosts file is used to set the hostname and the order in which the system resolves addresses. It contains mappings of IP addresses to hostnames and can be used to define the local system's hostname.

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.