Which command lists all files in a directory including hidden ones?
-a shows all files, including hidden files.
Why this answer
The ls -a (all) option displays all files, including those beginning with a dot.
37 questions · The Linux Operating System · All types, answers revealed
Which command lists all files in a directory including hidden ones?
-a shows all files, including hidden files.
Why this answer
The ls -a (all) option displays all files, including those beginning with a dot.
Which TWO of the following are examples of Linux distributions?
A foundational Linux distribution.
Why this answer
Ubuntu and Debian are both popular Linux distributions.
Which TWO of the following are examples of common Linux filesystems?
ext4 is a standard Linux filesystem.
Why this answer
ext4 and xfs are both widely used journaling filesystems in Linux.
You need to determine the UUID of a partition to add it to /etc/fstab. Which command should you use?
blkid lists block device identifiers like UUIDs.
Why this answer
The blkid command displays attributes of block devices, including UUIDs.
You need to ensure that a server's time is synchronized with an external time source to prevent authentication errors. Which daemon is responsible for this?
chronyd is the standard service for NTP synchronization.
Why this answer
The chronyd or ntpd service is typically responsible for network time synchronization.
A user reports that they cannot save files to their home directory. You find that the disk is not full. What is the most likely cause related to hardware-based limitations?
An inode exhaustion prevents new file creation even if disk space remains.
Why this answer
If the disk is not full, the partition might have reached its inode limit, preventing the creation of new files.
You have added a new hard drive to your Linux server, but the system does not automatically recognize the device. What is the first step you should take to verify if the kernel detects the hardware?
dmesg shows kernel hardware detection messages.
Why this answer
The dmesg command displays the kernel ring buffer, which logs hardware detection events during boot or device insertion.
Which TWO of the following are valid ways to view system logs?
journalctl displays systemd logs.
Why this answer
dmesg and journalctl are standard tools to access system logs.
An administrator wants to view the current system load and active processes. Which utility is the most appropriate for a real-time monitor?
top shows a live view of CPU, memory, and tasks.
Why this answer
The top command provides a dynamic, real-time view of running processes and system load.
You are configuring a Linux server and need to determine which hard drive partition is currently mounted as the root filesystem. Which file should you inspect?
This file defines how filesystems are mounted at boot.
Why this answer
The /etc/fstab file contains information about filesystems and their mount points.
Which THREE of the following are components of a standard network configuration?
Defines the network segment.
Why this answer
IP address, subnet mask, and default gateway are essential for basic network communication.
You are setting up a local network and need to verify the path traffic takes to reach a remote host. Which command should you use?
traceroute maps the network path to a host.
Why this answer
The traceroute command displays the path and latency of each hop to a destination.
Which command is used to display the current directory path in the terminal?
pwd displays the current directory path.
Why this answer
The pwd (print working directory) command shows the full path of the current directory.
A developer needs to know the kernel version currently running on the server. Which command provides this information?
uname -r specifically identifies the kernel version.
Why this answer
The uname -r command displays the release version of the Linux kernel.
You are trying to troubleshoot why a user cannot connect to your server via SSH. You want to see if the SSH daemon is listening on the appropriate port. Which command should you run?
ss -tulpn shows listening TCP/UDP ports.
Why this answer
The ss or netstat commands show active network sockets and the services listening on them.
Which TWO of the following commands help in identifying hardware on a system?
Lists PCI hardware devices.
Why this answer
lspci and lsusb are used to list hardware devices connected to their respective buses.
You suspect that a process is consuming too much CPU. Which command allows you to sort active processes by CPU usage?
top provides an interactive, sortable list of processes.
Why this answer
The top command allows sorting by CPU usage by pressing 'P' while it is running.
You are configuring a static IP address on a Debian-based server. Which file must be modified to make this change persistent across reboots?
This is the correct file for configuring Debian network interfaces.
Why this answer
On Debian/Ubuntu systems, /etc/network/interfaces is the file used to define persistent network interface configurations.
You have modified a configuration file for a network service. Which command is best practice to test the configuration syntax before restarting the service?
This command verifies configuration syntax.
Why this answer
Many services (like Apache or Nginx) provide a config test option (e.g., -t) to prevent service downtime due to syntax errors.
Which THREE commands can be used to display information about system memory?
vmstat shows virtual memory stats.
Why this answer
free, vmstat, and top provide various ways to monitor system memory usage.
A server is running out of disk space. Which command allows you to view the space usage of directories in a human-readable format?
du -sh provides a summary of directory usage.
Why this answer
The du -sh command summarizes disk usage for directories in human-readable units.
Which TWO of the following directories are usually located at the root of a Linux filesystem?
Contains system configuration files.
Why this answer
/bin and /etc are standard directories at the root level of a Linux system.
A system administrator is checking for hardware errors in the logs. Where are general system messages usually stored?
/var/log/syslog contains general system messages.
Why this answer
The /var/log/messages or /var/log/syslog file is the primary repository for system-wide logs.
Which TWO of the following are considered hardware components?
The processor is physical hardware.
Why this answer
CPU and RAM are physical hardware components of a computer system.
You are troubleshooting a network issue where a Linux server cannot reach an external website. The ping command to the gateway succeeds, but pinging the website IP fails. Which configuration file should you check to ensure the server can resolve domain names?
This file defines the DNS resolvers used by the system.
Why this answer
The /etc/resolv.conf file contains DNS server addresses required for domain name resolution.
Which TWO of the following tools allow you to manage disk partitions?
A common partition management tool.
Why this answer
fdisk and parted are standard tools for disk partition management.
A junior admin is confused about the difference between software RAID and hardware RAID. Which of the following is a primary characteristic of software RAID?
Software RAID is kernel-based management.
Why this answer
Software RAID is managed by the Linux kernel via the mdadm utility, relying on the host CPU.
You need to change the ownership of a file to user 'admin'. Which command is the correct way to do this?
chown changes the owner of the file.
Why this answer
The chown command is used to change file ownership.
You are managing a Linux server and need to confirm the IP address assigned to the eth0 interface. Which command is most appropriate on modern distributions?
ip addr is the recommended command for showing IP configurations.
Why this answer
The ip addr command is the modern standard for displaying network interface configurations.
Which THREE of the following files/commands are involved in system startup or services?
Legacy directory for service scripts.
Why this answer
systemd, init, and the /etc/init.d directory are all standard components of the service management architecture in Linux.
An administrator needs to monitor network traffic in real-time on a specific interface. Which tool is commonly used to capture and display packets?
tcpdump allows real-time packet capture.
Why this answer
tcpdump is the standard command-line utility for packet capture and analysis.
A system administrator wants to check the partition table of a specific disk. Which tool is used for this?
fdisk is used to display or modify partition tables.
Why this answer
fdisk is a common command-line utility used to view and manipulate partition tables.
Which THREE of the following items are typically found in the /etc directory?
This defines filesystem mount points.
Why this answer
The /etc directory contains system-wide configuration files, such as passwd, hosts, and fstab.
What is the purpose of the /proc directory in Linux?
/proc is a virtual filesystem for kernel/process data.
Why this answer
The /proc directory is a virtual filesystem that provides an interface to kernel data structures and process information.
Which TWO commands are commonly used to check network connectivity to a host?
ping is essential for basic connectivity tests.
Why this answer
ping and traceroute are the primary tools for diagnosing network connectivity issues.
A small business owner wants to implement a server that allows for long-term support and stability for critical financial applications. Which distribution strategy should they prioritize?
LTS versions are designed for stability in enterprise environments.
Why this answer
Long Term Support (LTS) distributions prioritize stability and security updates over cutting-edge features.
A technician needs to identify the amount of RAM installed in a server without opening the chassis. Which command provides this information from the command line?
free -m displays memory usage in megabytes.
Why this answer
The free command displays the total, used, and free physical memory and swap space in the system.
Ready to test yourself?
Try a timed practice session using only The Linux Operating System questions.