Which command displays a visual representation of disk usage in Linux?

  • ncdu
  • dd
  • du
  • df
The correct command to display a visual representation of disk usage in Linux is ncdu. It stands for "NCurses Disk Usage" and provides a detailed and interactive view of disk usage, allowing users to navigate through directories and identify space-consuming files or folders. Unlike the other options, ncdu is specifically designed for this purpose.

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.

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.

Which command allows you to change directories in the terminal?

  • cat
  • cd
  • ls
  • pwd
The cd command is used to change directories in the terminal. It stands for "change directory," and it is essential for navigating the Linux file system. You can use it to move between different directories or folders.

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.

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.

Which file system is commonly used in many modern Linux distributions and supports journaling?

  • ext4
  • FAT32
  • NTFS
  • HFS+
ext4 is a commonly used file system in many modern Linux distributions. It supports journaling, which helps in maintaining the integrity of the file system, especially in case of sudden system crashes or power failures. Journaling keeps track of changes before they are committed, making it a reliable choice for Linux.

You are working on a system and want to compile a program from source. You realize you need some development tools. In which directory would you expect to find these tools?

  • /opt
  • /usr/bin
  • /usr/include
  • /usr/local/bin
Development tools, such as compilers and libraries, are commonly found in the /usr/local/bin directory. This directory is used for software that is installed locally and not managed by the system's package manager. It's a common location for development tools.

In the context of VPNs in Linux, the _________ protocol is known for its speed and efficiency but may not be as secure as other options.

  • PPTP
  • OpenVPN
  • IPsec
  • L2TP
In the context of VPNs in Linux, the PPTP (Point-to-Point Tunneling Protocol) is known for its speed and efficiency but may not be as secure as other options. PPTP has known vulnerabilities, so it's not recommended for highly sensitive or secure communications.

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.