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.

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.

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.

A user reports that their application occasionally freezes. You suspect it's due to the application waiting for some I/O operations to complete. Which state might the process be in during these freezes?

  • D (Uninterruptible Sleep)
  • R (Running)
  • S (Sleeping)
  • Z (Zombie)
During an I/O operation, a process might enter the "D" state, which stands for Uninterruptible Sleep. This state indicates that the process is waiting for a resource to become available, and it cannot be interrupted. It's often associated with I/O-related delays or problems.

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.

After implementing a new SELinux policy, a certain application fails to work. To troubleshoot, you decide to temporarily change SELinux mode. Which mode allows everything but logs violations?

  • Permissive mode
  • Enforcing mode
  • Disabled mode
  • Audit mode
To temporarily change SELinux mode and allow everything while logging violations, you would use the "Permissive" mode. In this mode, SELinux will log policy violations but won't enforce them, which helps troubleshoot and analyze any issues without blocking the application.

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.

The _________ command provides a bird's-eye view of the system's current resource usage, including CPU, RAM, and swap.

  • top
  • ps
  • ls
  • sysstat
The top command provides a bird's-eye view of the system's current resource usage, including CPU, RAM, and swap. It offers real-time monitoring of processes and their resource consumption.

A company wants to deploy a microservices architecture for their application. They are looking for a technology that can package each service with its dependencies and configuration in a reproducible way. Which technology would best fit this requirement?

  • Docker
  • Kubernetes
  • Vagrant
  • Helm
Docker is a technology that allows you to package applications and their dependencies into containers. It's an excellent choice for deploying microservices, as it ensures that each service is encapsulated with its dependencies and configurations, making it highly reproducible and scalable.

Which command tests for file types and compares values in Bash scripting?

  • test
  • eval
  • exec
  • check
In Bash scripting, the test command is used to test for file types and compare values. It is often used with conditional statements like if and elif to perform tests on files, strings, and other expressions. The test command is also equivalent to [ ] in Bash.