Unlock hundreds more features
Save your Quiz to the Dashboard
View and Export Results
Use AI to Create Quizzes and Analyse Results

Sign inSign in with Facebook
Sign inSign in with Google

Linux Essentials Final Exam - Test Your Linux Knowledge!

Ready to dive into Linux directory structure basics? Take the quiz now!

Difficulty: Moderate
2-5mins
Learning OutcomesCheat Sheet
paper art quiz banner with Linux root directory icon terminal prompt and file tree on dark blue background

Use this quiz to identify the Linux top-level directory and see how "/" anchors the file system. Practice with short questions to check gaps before an exam or interview and strengthen your command of paths and common directories. If you want a quick refresher first, read the Linux basics guide and then begin.

Which directory is the root of the Linux filesystem?
/etc
/usr
/
/home
The root directory, represented by '/', is the top-level directory in a Linux filesystem. All other files and directories are mounted or located under it. Understanding that '/' is the absolute base is fundamental. .
Which directory typically contains user home directories on a standard Linux system?
/srv
/root
/home
/opt
User home directories are usually located under '/home'. Each regular user account has a subdirectory there. The root user's home is '/root', not '/home'. .
Which directory contains essential system binaries required for both single-user and multi-user modes?
/bin
/sbin
/usr/bin
/usr/local/bin
Binaries in '/bin' are essential for system booting and repair and must be available even if '/usr' is on a separate partition. They are used in both single-user and multi-user modes. .
Which directory holds kernel and bootloader files?
/var
/boot
/etc
/lib
The '/boot' directory stores the kernel images, initramfs, and bootloader configuration files. It must be available to the bootloader at startup. .
Which directory contains device special files representing hardware components?
/sys
/media
/dev
/proc
The '/dev' directory holds device nodes through which the kernel and applications access hardware devices. These files appear as block or character devices. .
What is the home directory of the root user?
/usr
/opt
/root
/home
The root user's home directory is '/root' by convention. It is separate from regular users' homes under '/home'. This separation enhances security and manageability. .
Which directory contains shared libraries needed to boot the system?
/opt/lib
/usr/local/lib
/lib
/usr/lib
Essential shared libraries used by binaries in '/bin' and '/sbin' are kept in '/lib'. Without these, the system would fail to boot. .
Which top-level directory is intended for temporary files?
/tmp
/run
/var
/opt
The '/tmp' directory holds temporary files created by applications and scripts. It may be cleared upon system reboot depending on configuration. .
Which top-level directory typically holds logs and spool files?
/etc
/usr
/var
/home
Variable data files such as logs, mail spools, and printer spools reside in '/var'. It often requires its own partition for disk usage management. .
Which directory is the default mount point for removable media like CDs and USB drives?
/mnt
/srv
/opt
/media
Modern distributions use '/media' for automounted removable storage media. Each device gets its own subdirectory under '/media'. .
Which directory is commonly used for manually mounting filesystems temporarily?
/srv
/media
/mnt
/run
Administrators traditionally use '/mnt' as a generic mount point for testing or maintenance. It is not managed by the system automatically. .
Where are optional third-party application packages usually installed?
/var
/opt
/bin
/usr
The '/opt' directory is reserved for optional and add-on application software packages. Each vendor can create its own subdirectory there. .
Which directory holds volatile runtime data like PID files?
/proc
/run
/var
/tmp
The '/run' directory (often tmpfs) stores runtime data that needs to be available early in boot. It replaces legacy '/var/run'. .
Which virtual filesystem directory exports kernel and process information as files?
/proc
/sys
/var
/dev
The '/proc' filesystem is a virtual interface to kernel data structures, providing process and system info. It is essential for many system utilities. .
Which directory holds system configuration files?
/var
/usr
/etc
/bin
All host-specific system configuration files reside in '/etc'. They control the behavior of system and application programs. .
Which directory contains data served by system daemons?
/usr
/srv
/var
/opt
The '/srv' directory holds site-specific data for services provided by the system, such as web and FTP data. It helps isolate service data from other variable data. .
What is the typical purpose of the /usr directory in Linux?
Holds essential boot files
Contains user home directories
Stores variable runtime data
Second-level hierarchy for shareable, read-only data
The '/usr' directory serves as a shareable, read-only hierarchy for userland programs and libraries. It typically contains '/usr/bin', '/usr/lib', and '/usr/share'. It can be mounted read-only for security. .
What is the purpose of the /lost+found directory at the root of an ext filesystem?
Recovered file fragments after fsck
System logs
Temporary mount point
User backup files
On ext2/3/4 filesystems, '/lost+found' holds recovered file fragments found by fsck. Each filesystem needs its own lost+found. It enables data recovery after corruption. .
Which command lists only the top-level directories under '/'?
ls -l /
ls /*/*
find / -maxdepth 2
ls /
Running 'ls /' lists the contents of the root directory. This shows all immediate subdirectories. Adding '-l' changes the format but not the depth. .
Which directory under root is generally not a separate mount point by default?
/var
/bin
/boot
/home
Out of the options, '/bin' usually resides on the same partition as '/'. Directories like '/home', '/boot', and '/var' are often separate for security or performance. .
Where would third-party software typically be installed if following FHS recommendations?
/usr
/bin
/usr/local
/opt
Third-party or add-on packages that don't comply with standard layout go under '/opt'. '/usr/local' is for software local to the host. '/opt' keeps vendors' files isolated. .
Which directory is recommended to have its own partition to avoid filling up the root filesystem with logs?
/usr
/var
/etc
/home
Because '/var' holds logs, mail, and spool files, it can grow unexpectedly. Putting '/var' on a separate partition isolates disk usage. This prevents log overflow from crashing system functions. .
Which filesystem type is normally mounted at /proc?
ext4
sysfs
procfs
tmpfs
The '/proc' directory is a procfs virtual filesystem created by the kernel. It exposes process and kernel information. It is not backed by disk storage. .
Which top-level directory is cleared on each reboot on many modern distributions?
/usr
/var
/run
/home
The '/run' directory is often mounted as tmpfs, so its contents disappear on reboot. It replaced '/var/run' to provide early runtime data. .
Which command shows mounted filesystems including /?
mount
fdisk -l
lsblk
df -h
The 'mount' command lists all currently mounted filesystems and their mount points, including '/'. 'df -h' shows space usage but might not list pseudo filesystems by default. .
Where are system-wide manual pages stored by convention?
/etc/man
/man
/usr/share/man
/usr/man
Manual pages are kept under '/usr/share/man'. This directory structure follows section subdirectories like man1, man2, etc. It keeps documentation separate from binaries. .
What is the default location for core dumps on many distributions?
/var/crash
/home
/tmp
/var/log
Many distros direct core dumps to '/var/crash' when apport or abrt is in use. Administrators can override this via /proc/sys/kernel/core_pattern. .
Which path holds per-machine state information that persists across boots?
/var/lib
/lib/var
/state
/usr/lib
/var/lib contains state information for applications such as dpkg, RPM, and databases. It stays persistent across reboots. Other directories under /var hold different kinds of variable data. .
Which top-level directory is typically mounted as sysfs?
/run
/dev
/sys
/proc
/sys is a sysfs virtual filesystem exported by the kernel, providing a hierarchical view of kernel objects. It complements /proc for hardware and driver interaction. .
What is the difference between /run and the legacy /var/run?
/var/run holds logs, /run holds binaries
/run is temporary, /var/run is persistent
/run is mounted early as tmpfs, replacing /var/run
They are symlinks to each other with no real difference
Systemd and modern distros mount /run as tmpfs early in boot, replacing /var/run which becomes a symlink. This ensures runtime data is available before /var is mounted. .
In a default Linux install, which directory is NOT supposed to contain user-writable data?
/usr/bin
/srv
/opt
/home
'/usr/bin' is reserved for system applications and should not be modified by normal users. User data belongs in '/home', '/srv', or '/opt'. .
Which pseudo-filesystem shows mounted device information and I/O stats?
/sys
/run
/dev
/proc
/sys/class and /sys/block export device attributes and I/O statistics via sysfs. Tools like udev and systemd rely on it for hardware management. .
On a system using separate partitions, which directory should be mounted read-only for security?
/tmp
/usr
/home
/var
/usr contains shareable, static programs and libraries; mounting it read-only enhances security. It prevents unauthorized modification of installed software. .
Which directory would you inspect to find kernel module files?
/lib/modules
/usr/lib/modules
/opt/modules
/etc/modules
Kernel modules are stored under '/lib/modules//'. They are loaded as needed by the system. This location follows FHS guidelines. .
Which directory contains the default network interface information on many distributions?
/etc/netplan
/etc/sysconfig/network-scripts
/usr/etc/network
/etc/network
Debian-based systems place network interface configs in '/etc/network/interfaces.d' or '/etc/network/interfaces'. Other distros may differ. .
If /var/log fills up, which directory could you move to a separate partition to reduce risk?
/var/tmp
/var/run
/var/log
/var/lib
Separating '/var/log' onto its own partition isolates logs from other variable data and the root filesystem. This prevents full logs from impacting system stability. .
Which top-level directory is mounted using devtmpfs by default?
/dev
/run
/sys
/proc
/dev is mounted as devtmpfs to dynamically manage device nodes with kernel support. It automates creation of device nodes on hardware events. .
Where would you find systemd unit files provided by installed packages?
/opt/systemd/system
/var/lib/systemd
/etc/systemd/system
/usr/lib/systemd/system
Distributions place shipped service unit files in '/usr/lib/systemd/system'. Administrators override them in '/etc/systemd/system'. .
Which directory holds kernel tunable parameters at runtime?
/etc/sysctl.d
/usr/bin/sysctl
/proc/sys
/var/sys
/proc/sys provides a dynamic interface for changing kernel parameters at runtime via sysctl. Files under it correspond to kernel settings. .
On systems using SELinux, where are contexts configured by default?
/etc/selinux
/opt/selinux
/usr/share/selinux
/var/lib/selinux
SELinux policies and file context definitions live under '/etc/selinux'. This directory contains policy modules and configurations. .
Which directory stores documentation and info files under /usr?
/usr/doc
/usr/man
/usr/share/doc
/usr/info
GNU info pages are installed under '/usr/info'. Other documentation, like package docs, goes in '/usr/share/doc'. .
Which directory often holds kernel firmware files?
/usr/share/firmware
/opt/firmware
/lib/firmware
/usr/lib/firmware
Firmware binaries for devices are placed under '/lib/firmware'. The kernel requests these during driver initialization. .
Which directory would you check for udev rules on most systems?
/usr/lib/udev/rules.d
/var/lib/udev/rules.d
/lib/udev/rules.d
/etc/udev/rules.d
Custom udev rules are placed in '/etc/udev/rules.d', while default ones reside in '/usr/lib/udev/rules.d'. This separation allows local overrides. .
In a container environment, which directory namespace isolation is critical for hiding host /proc?
pivot_root on /
symlinking /home to /srv
mounting /sys as read-write
bind-mounting /dev
Containers often use pivot_root or chroot to change root filesystem, isolating /proc from the host. This prevents container processes from seeing host process info. .
Which kernel feature allows mounting of tmpfs on /tmp in an unprivileged container?
cgroups v1
selinux enforcement
cap_net_admin
user namespaces
User namespaces let unprivileged users mount filesystems like tmpfs. This is crucial for container isolation. .
What FUSE option can be used to mount a user-space filesystem under /mnt without root privileges?
-o nonempty
-o allow_other
-o user
-o user_id=0
The '-o user' option in /etc/fstab allows normal users to mount unprivileged FUSE filesystems. It's often combined with 'noauto'. .
Which bind mount trick is used to hide a directory under /sys from a container?
mount --move /sys /oldsys
mount --rbind /proc /sys
mount -t tmpfs tmpfs /sys
mount --bind /dev/null /sys/class
Mounting /dev/null over '/sys/class' hides kernel class information inside a container. bind mounts can mask underlying files. .
0
{"name":"Which directory is the root of the Linux filesystem?", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Which directory is the root of the Linux filesystem?, Which directory typically contains user home directories on a standard Linux system?, Which directory contains essential system binaries required for both single-user and multi-user modes?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}

Study Outcomes

  1. Identify how the top-level directory on a Linux system is represented -

    Recognize the root directory symbol "/" and understand its central role in the Linux file system hierarchy.

  2. Explain Linux file system hierarchy basics -

    Describe the purpose of key directories under root, such as /etc, /home, and /var, and their standard locations.

  3. Compare Unix and Linux directory structures -

    Differentiate structural variations between Unix and Linux file systems to appreciate compatibility and standards.

  4. Apply directory navigation and management commands -

    Use commands like cd, ls, and tree to navigate, list, and inspect directories within the Linux environment.

  5. Analyze Linux kernel functions affecting file systems -

    Assess how the kernel interacts with the file system, including mounting processes and system calls for file management.

  6. Evaluate your knowledge with a Linux file system hierarchy quiz -

    Test your understanding through targeted questions that reinforce core directory structure concepts and certification prep.

Cheat Sheet

  1. Root Directory (/) -

    The top-level directory on a Linux system is represented as "/" according to the Filesystem Hierarchy Standard (FHS), acting as the origin for every file and folder beneath it. Think of it as the trunk of a tree from which branches like /bin, /etc, and /home extend. Mnemonic: "Slash starts the stash."

  2. User vs. System Binaries (/bin & /sbin) -

    In linux directory structure basics, /bin holds essential user commands (like ls and cp) while /sbin stores system administration tools (like ifconfig and fsck). Knowing this split helps you decide when to call sudo and when regular user privileges suffice. Example: "sudo /sbin/shutdown" versus "/bin/echo 'Hello!'."

  3. Configuration Files (/etc) -

    The /etc directory houses global configuration files, from /etc/passwd for user accounts to /etc/ssh/sshd_config for secure shell settings. A quick linux file system hierarchy quiz often asks "Where do I set environment variables?" - answer: /etc/environment or shell-specific files. Tip: Backup /etc with "cp -a /etc /etc.bak" before edits.

  4. User Data & Local Installs (/home & /usr/local) -

    /home contains individual user directories (e.g., /home/alice) while /usr/local is reserved for locally compiled software, reflecting unix and linux differences quiz topics on software hierarchy. On Unix these might merge under /usr, but Linux keeps /home and /usr/local separate for clarity. Remember: "Home sweet home," and "local stays local."

  5. Kernel & Modules (/boot & /lib/modules) -

    The /boot directory stores bootloader files and kernel images (vmlinuz-*), and /lib/modules holds kernel modules loaded at runtime. Many linux kernel functions questions probe your grasp of how initramfs and modprobe work together. Quick check: "ls /boot/vmlinuz-*" then "modinfo " to inspect modules.

Powered by: Quiz Maker