Courseiva

CCNA The Linux Operating System Questions

37 questions · The Linux Operating System · All types, answers revealed

1
MCQeasy

Which command lists all files in a directory including hidden ones?

A.ls -h
B.ls -l
C.dir -hidden
D.ls -a
AnswerD

-a shows all files, including hidden files.

Why this answer

The ls -a (all) option displays all files, including those beginning with a dot.

2
Multi-Selecteasy

Which TWO of the following are examples of Linux distributions?

Select 2 answers
A.Chrome
B.Windows
C.Debian
D.Ubuntu
E.Office
AnswersC, D

A foundational Linux distribution.

Why this answer

Ubuntu and Debian are both popular Linux distributions.

3
Multi-Selecteasy

Which TWO of the following are examples of common Linux filesystems?

Select 2 answers
A.FAT32
B.ext4
C.HFS
D.NTFS
E.XFS
AnswersB, E

ext4 is a standard Linux filesystem.

Why this answer

ext4 and xfs are both widely used journaling filesystems in Linux.

4
MCQmedium

You need to determine the UUID of a partition to add it to /etc/fstab. Which command should you use?

A.ls -l
B.find
C.blkid
D.mount
AnswerC

blkid lists block device identifiers like UUIDs.

Why this answer

The blkid command displays attributes of block devices, including UUIDs.

5
MCQmedium

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?

A.cron
B.chronyd
C.sshd
D.rsyslogd
AnswerB

chronyd is the standard service for NTP synchronization.

Why this answer

The chronyd or ntpd service is typically responsible for network time synchronization.

6
MCQmedium

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?

A.The partition has run out of inodes.
B.The RAM is corrupted.
C.The CPU temperature is too high.
D.The BIOS settings are incorrect.
AnswerA

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.

7
MCQhard

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?

A.Reinstall the operating system.
B.Examine the output of dmesg.
C.Run the top command.
D.Edit the /etc/fstab file.
AnswerB

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.

8
Multi-Selectmedium

Which TWO of the following are valid ways to view system logs?

Select 2 answers
A.lsmod
B.ifconfig
C.top
D.journalctl
E.dmesg
AnswersD, E

journalctl displays systemd logs.

Why this answer

dmesg and journalctl are standard tools to access system logs.

9
MCQeasy

An administrator wants to view the current system load and active processes. Which utility is the most appropriate for a real-time monitor?

A.df -T
B.ps aux
C.cat /proc/cpuinfo
D.top
AnswerD

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.

10
MCQmedium

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?

A./var/log/dmesg
B./etc/passwd
C./proc/partitions
D./etc/fstab
AnswerD

This file defines how filesystems are mounted at boot.

Why this answer

The /etc/fstab file contains information about filesystems and their mount points.

11
Multi-Selecthard

Which THREE of the following are components of a standard network configuration?

Select 3 answers
A.Subnet mask
B.IP address
C.Shell prompt
D.Kernel version
E.Default gateway
AnswersA, B, E

Defines the network segment.

Why this answer

IP address, subnet mask, and default gateway are essential for basic network communication.

12
MCQhard

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?

A.traceroute
B.nmap
C.ping
D.dig
AnswerA

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.

13
MCQeasy

Which command is used to display the current directory path in the terminal?

A.ls
B.dir
C.pwd
D.cd
AnswerC

pwd displays the current directory path.

Why this answer

The pwd (print working directory) command shows the full path of the current directory.

14
MCQeasy

A developer needs to know the kernel version currently running on the server. Which command provides this information?

A.uname -r
B.ver
C.hostnamectl
D.cat /etc/issue
AnswerA

uname -r specifically identifies the kernel version.

Why this answer

The uname -r command displays the release version of the Linux kernel.

15
MCQhard

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?

A.host
B.ping
C.ss -tulpn
D.ip link
AnswerC

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.

16
Multi-Selectmedium

Which TWO of the following commands help in identifying hardware on a system?

Select 2 answers
A.lspci
B.pwd
C.lsusb
D.whoami
E.date
AnswersA, C

Lists PCI hardware devices.

Why this answer

lspci and lsusb are used to list hardware devices connected to their respective buses.

17
MCQmedium

You suspect that a process is consuming too much CPU. Which command allows you to sort active processes by CPU usage?

A.kill
B.nice
C.top
D.ps -ef
AnswerC

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.

18
MCQhard

You are configuring a static IP address on a Debian-based server. Which file must be modified to make this change persistent across reboots?

A./etc/network/interfaces
B./etc/hosts
C./etc/sysconfig/network-scripts/ifcfg-eth0
D./etc/resolve.conf
AnswerA

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.

19
MCQhard

You have modified a configuration file for a network service. Which command is best practice to test the configuration syntax before restarting the service?

A.systemctl reload
B.apache2ctl -t
C.systemctl status
D.service name test
AnswerB

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.

20
Multi-Selecthard

Which THREE commands can be used to display information about system memory?

Select 3 answers
A.ifconfig
B.vmstat
C.top
D.lsblk
E.free
AnswersB, C, E

vmstat shows virtual memory stats.

Why this answer

free, vmstat, and top provide various ways to monitor system memory usage.

21
MCQmedium

A server is running out of disk space. Which command allows you to view the space usage of directories in a human-readable format?

A.ls -s
B.fdisk
C.du -sh
D.df -h
AnswerC

du -sh provides a summary of directory usage.

Why this answer

The du -sh command summarizes disk usage for directories in human-readable units.

22
Multi-Selecteasy

Which TWO of the following directories are usually located at the root of a Linux filesystem?

Select 2 answers
A./etc
B./users
C./windows
D./programs
E./bin
AnswersA, E

Contains system configuration files.

Why this answer

/bin and /etc are standard directories at the root level of a Linux system.

23
MCQmedium

A system administrator is checking for hardware errors in the logs. Where are general system messages usually stored?

A./etc/log/
B./var/log/syslog
C./proc/logs
D./tmp/logs
AnswerB

/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.

24
Multi-Selecteasy

Which TWO of the following are considered hardware components?

Select 2 answers
A.Kernel
B.CPU
C.RAM
D.Bash
E.systemd
AnswersB, C

The processor is physical hardware.

Why this answer

CPU and RAM are physical hardware components of a computer system.

25
MCQhard

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?

A./etc/network/interfaces
B./etc/sysconfig/network
C./etc/hosts
D./etc/resolv.conf
AnswerD

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.

26
Multi-Selectmedium

Which TWO of the following tools allow you to manage disk partitions?

Select 2 answers
A.fdisk
B.parted
C.cat
D.sed
E.grep
AnswersA, B

A common partition management tool.

Why this answer

fdisk and parted are standard tools for disk partition management.

27
MCQmedium

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?

A.It is managed by the OS and kernel.
B.It is always faster than hardware RAID.
C.It is configured in the BIOS.
D.It requires a dedicated controller card.
AnswerA

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.

28
MCQmedium

You need to change the ownership of a file to user 'admin'. Which command is the correct way to do this?

A.usermod admin file
B.chown admin file
C.chmod admin file
D.chgrp admin file
AnswerB

chown changes the owner of the file.

Why this answer

The chown command is used to change file ownership.

29
MCQmedium

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?

A.ifconfig
B.ip addr
C.route -n
D.netstat -rn
AnswerB

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.

30
Multi-Selecthard

Which THREE of the following files/commands are involved in system startup or services?

Select 3 answers
A./etc/hosts
B./etc/init.d
C.systemd
D./proc/cpuinfo
E.init
AnswersB, C, E

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.

31
MCQhard

An administrator needs to monitor network traffic in real-time on a specific interface. Which tool is commonly used to capture and display packets?

A.netstat
B.tcpdump
C.iptables
D.nmap
AnswerB

tcpdump allows real-time packet capture.

Why this answer

tcpdump is the standard command-line utility for packet capture and analysis.

32
MCQmedium

A system administrator wants to check the partition table of a specific disk. Which tool is used for this?

A.fsck
B.df
C.mkfs
D.fdisk
AnswerD

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.

33
Multi-Selecthard

Which THREE of the following items are typically found in the /etc directory?

Select 3 answers
A./etc/tmp
B./etc/fstab
C./etc/passwd
D./etc/hosts
E./etc/bin
AnswersB, C, D

This defines filesystem mount points.

Why this answer

The /etc directory contains system-wide configuration files, such as passwd, hosts, and fstab.

34
MCQeasy

What is the purpose of the /proc directory in Linux?

A.To store configuration files for boot.
B.To store user passwords.
C.To provide information about kernel and processes.
D.To store temporary system files.
AnswerC

/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.

35
Multi-Selectmedium

Which TWO commands are commonly used to check network connectivity to a host?

Select 2 answers
A.arp
B.fdisk
C.ping
D.traceroute
E.ssh
AnswersC, D

ping is essential for basic connectivity tests.

Why this answer

ping and traceroute are the primary tools for diagnosing network connectivity issues.

36
MCQeasy

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?

A.Choosing a distribution that offers an LTS version with a long support lifecycle.
B.Using a desktop-focused distribution for ease of installation.
C.Compiling the kernel from source to match the specific hardware.
D.Selecting a rolling release distribution for frequent kernel updates.
AnswerA

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.

37
MCQeasy

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?

A.uptime
B.lsblk
C.free -m
D.df -h
AnswerC

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.