What is the primary purpose of the visudo command?

  • Edit the sudoers file safely
  • View system logs
  • Manage user passwords
  • Install software packages
The primary purpose of the visudo command is to safely edit the sudoers file. The sudoers file specifies which users or groups are allowed to run commands with elevated privileges using sudo. Using visudo is recommended because it checks the syntax of the file and prevents potential errors that could lock you out of your system.

When partitioning a disk, what is the primary partition limit on an MBR disk?

  • 4
  • 2
  • 8
  • 16
When partitioning a disk using the Master Boot Record (MBR) partitioning scheme, you can create up to 4 primary partitions. This is a limitation of the MBR scheme, and to create more partitions, you would need to use extended or logical partitions.

When configuring SSH key-based authentication, which file is typically modified on the server?

  • ~/.ssh/id_rsa
  • /etc/passwd
  • /etc/ssh/sshd_config
  • /etc/sudoers
When configuring SSH key-based authentication on the server, the typical file to modify is /etc/ssh/sshd_config. This file contains configuration settings for the SSH server, including options related to key-based authentication.

When debugging, which shell built-in command can be used to read and execute commands from a file?

  • source
  • execute
  • run
  • debug
When debugging in shell scripting, the source command (or . for short) is used to read and execute commands from a file. This is often used to include external script files or configuration files into the current script, allowing you to reuse code or set environment variables.

You've been tasked with setting up a Linux server that can share files with Windows clients in the network, ensuring they can access it seamlessly. Which software would you primarily consider installing?

  • Samba
  • NFS
  • SSH
  • FTP
To enable seamless file sharing with Windows clients, you would primarily consider installing Samba. Samba is a software suite that allows interoperability between Linux/Unix servers and Windows-based clients. It provides support for the SMB/CIFS protocol used in Windows networking.

For debugging purposes, how can you set a breakpoint in a shell script?

  • Using the set -e command
  • Inserting the line # breakpoint in the script
  • Using the break command
  • Setting a variable to DEBUG=true
To set a breakpoint in a shell script, you can insert the line # breakpoint in the script. When the script runs, it will stop execution at this line, allowing you to inspect variables and step through code for debugging purposes.

What does the ifconfig command primarily display?

  • Network interface information
  • System uptime
  • List of installed packages
  • CPU usage statistics
The ifconfig command primarily displays network interface information. It shows details about all network interfaces on the system, such as their IP addresses, MAC addresses, and network configuration settings. This command is essential for managing and configuring network interfaces in Linux.

When setting up SSH for the first time, the server-side cryptographic keys are stored in the /etc/ssh/________ directory.

  • ssh_keys
  • certs
  • ssh_host_keys
  • crypto
When setting up SSH for the first time, the server-side cryptographic keys are stored in the /etc/ssh/ssh_host_keys directory. These keys are crucial for secure SSH communication.

The systemctl command is primarily used to control the _________ system and service manager.

  • Systemd
  • Init
  • Upstart
  • SysV
The systemctl command is primarily used to control the "systemd" system and service manager. Systemd is the init system in most modern Linux distributions, responsible for managing system processes and services, making it an essential tool for system administrators.

Which component of the Linux system manages process scheduling?

  • Scheduler
  • Memory Manager
  • File System
  • Kernel
The component of the Linux system that manages process scheduling is the Scheduler. The scheduler is responsible for determining the order in which processes are executed on the CPU, ensuring efficient and fair utilization of system resources.

Which Linux distribution has a rolling release update model and is known for its simplicity?

  • Arch Linux
  • CentOS
  • Fedora
  • Slackware
Arch Linux is a Linux distribution known for its rolling release update model and simplicity. In a rolling release, software updates are continuously provided, and users do not need to reinstall the entire system for major updates. Arch Linux allows for a highly customizable and minimalistic Linux environment.

In the context of disk partitions, what does LVM stand for?

  • Logical Volume Manager
  • Linux Virtual Machine
  • Large Volume Memory
  • Logical Virtual Machine
In the context of disk partitions, LVM stands for "Logical Volume Manager." LVM is a technology that allows for flexible management of disk space in Linux. It enables features like dynamic resizing, snapshots, and the creation of logical volumes that span multiple physical disks. LVM is a crucial tool for efficiently managing storage in complex Linux environments.