In shell scripting, a loop that processes each item in a list one by one is known as a _________ loop.

  • for
  • while
  • until
  • foreach
In shell scripting, a loop that processes each item in a list one by one is known as a for loop. The "for" loop allows you to iterate through a list of items, such as files or elements in an array, and perform actions on each item. It's a fundamental construct for automation and scripting tasks.

Which file in Linux would you edit to set a system's DNS resolver addresses?

  • /etc/resolv.conf
  • /etc/hostname
  • /etc/dns.conf
  • /etc/networks
To set a system's DNS resolver addresses in Linux, you would edit the /etc/resolv.conf file. This file contains the IP addresses of the DNS servers that the system should use for domain name resolution.

Services in Linux that start at boot and run in the background are commonly referred to as _________.

  • services
  • daemons
  • applications
  • processes
Services in Linux that start at boot and run in the background are commonly referred to as daemons. Daemons are long-running background processes that perform various tasks such as serving network requests, managing hardware devices, and more.

The _________ command provides a snapshot of the current processes in the system.

  • df
  • ls
  • ps
  • top
The ps command in Linux provides a snapshot of the current processes in the system. It displays detailed information about running processes, including their process IDs (PIDs), CPU and memory usage, and other vital statistics.

What command can be used to view the partition table of a disk in Linux?

  • fdisk
  • lsblk
  • diskutil
  • parted
The fdisk command is used to view the partition table of a disk in Linux. It provides a detailed view of the partitions on the disk, their sizes, types, and more.

In SSH, the private key should be kept secure and the ________ key is added to the server for authentication.

  • Public
  • Shared
  • Admin
  • Root
In SSH, the private key should be kept secure, and the public key is added to the server for authentication. The server uses the public key to verify the identity of the connecting client.

What kernel component is responsible for memory management, including allocation and page replacement?

  • Memory Management Unit (MMU)
  • Page Table
  • Virtual Memory Manager
  • Kernel Scheduler
The kernel component responsible for memory management, including memory allocation and page replacement, is the Virtual Memory Manager (VMM). The VMM is an integral part of the Linux kernel and ensures efficient utilization of physical and virtual memory resources.

Which Samba tool is used for checking the configuration file for errors?

  • testparm
  • smbstatus
  • smbtree
  • smbpasswd
The testparm tool in Samba is used to check the configuration file for errors. It helps you validate your Samba configuration to ensure that it is correctly formatted and free of syntax errors. Running testparm is a useful step in troubleshooting Samba configuration issues.

Which Linux distribution is commercially backed by Canonical?

  • CentOS
  • Debian
  • Fedora
  • Ubuntu
Ubuntu is a Linux distribution that is commercially backed by Canonical. Canonical provides support and services for Ubuntu, making it a popular choice for both desktop and server environments.

You're creating a script that should take different actions based on the day of the week. Which Bash construct would be most suitable for this?

  • if...else statements
  • case statement
  • for loop
  • while loop
The most suitable Bash construct for taking different actions based on the day of the week is the case statement. You can use case to evaluate the value of the day and define different actions for each day. Options 1, 3, and 4 are not specifically designed for this purpose; they serve different scripting needs.