Skip to main content

Module 2 Quiz - Linux System Architecture

Instructions​

This quiz contains 30 multiple-choice questions to validate your understanding of Module 2.

Tip: Answer each question before revealing the answer. The answers are hidden just after each question.


Question 1​

What is the main role of the Linux Kernel?

See explanation

Correct answer: Manage hardware resources (CPU, memory, disk, network) and provide an interface for applications

Explanation: The Linux Kernel is the core of the operating system. It directly manages the hardware and provides system calls for applications to interact with resources.


Question 2​

What is the PID of the init (or systemd) process?

See explanation

Correct answer: 1

Explanation: The init process (or systemd on modern systems) always has PID 1. It is the first process launched at startup and the parent of all other processes.


Question 3​

What is User Space in Linux?

See explanation

Correct answer: The environment where user applications run, separate from the Kernel

Explanation: User Space contains all applications, libraries, and tools that users use. These processes run in non-privileged mode and communicate with the Kernel via system calls.


Question 4​

Which command displays kernel information?

See explanation

Correct answer: uname

Explanation: uname -a displays all system information, including the kernel name, version, architecture, etc. Common options: uname -r (kernel version), uname -m (architecture).


Question 5​

What is a kernel module?

See explanation

Correct answer: Code that can be dynamically loaded and unloaded into the kernel to add functionality

Explanation: Kernel modules allow adding features (hardware drivers, file systems, etc.) without recompiling the kernel. Commands: lsmod, modprobe, insmod, rmmod.


Question 6​

Which command lists loaded kernel modules?

See explanation

Correct answer: lsmod

Explanation: lsmod displays the list of currently loaded kernel modules. It is an alias for cat /proc/modules.


Question 7​

What is the VFS (Virtual File System) in Linux?

See explanation

Correct answer: An abstraction layer that allows the kernel to uniformly access different types of file systems

Explanation: The VFS provides a uniform interface to access different file systems (ext4, XFS, NTFS, NFS, etc.) without applications needing to know the details of each system.


Question 8​

What is the role of systemd in modern Linux distributions?

See explanation

Correct answer: Manage the init process, services, timers, mounts, and much more

Explanation: systemd is the modern initialization system replacing SysV init. It manages services, timers (alternative to cron), mounts, sockets, and many other aspects of the system.


Question 9​

Which command allows you to see running processes?

See explanation

Correct answer: ps

Explanation: ps (process status) displays processes. Common options: ps aux (all processes), ps -ef (extended format), ps -e (all processes).


Question 10​

What is a zombie process in Linux?

See explanation

Correct answer: A terminated process whose parent has not yet read its exit status

Explanation: A zombie process (state "Z") is a process that has terminated but whose entry in the process table has not yet been cleaned up because the parent process has not called wait() to read its exit status.


Question 11​

Which command displays system memory usage?

See explanation

Correct answer: free

Explanation: free -h displays memory (RAM) and swap usage in a readable format. You can also check /proc/meminfo for more details.


Question 12​

What is swap in Linux?

See explanation

Correct answer: Disk space used as an extension of RAM when physical memory is full

Explanation: Swap allows the system to use disk space as virtual memory. Inactive memory pages are written to swap to free up RAM. Commands: swapon, swapoff, free.


Question 13​

Which virtual directory contains information about running processes?

See explanation

Correct answer: /proc

Explanation: /proc is a virtual file system that exposes information about processes and the system. Each process has a /proc/PID/ directory with its information.


Question 14​

Which command loads a kernel module?

See explanation

Correct answer: modprobe or insmod

Explanation: modprobe module_name loads a module and its dependencies. insmod loads a module directly but does not handle dependencies. modprobe is generally preferred.


Question 15​

What is a daemon in Linux?

See explanation

Correct answer: A process that runs in the background, usually started at boot

Explanation: A daemon (or service) is a process that runs in the background to provide system services. Examples: sshd, httpd, systemd. On modern systems, they are managed by systemd.


Question 16​

Which command manages systemd services?

See explanation

Correct answer: systemctl

Explanation: systemctl is the main command to manage systemd services. Examples: systemctl start service, systemctl stop service, systemctl status service, systemctl enable service.


Question 17​

What is the role of the init process in Linux startup?

See explanation

Correct answer: Be the first user process launched and initialize the system

Explanation: The init process (PID 1) is launched by the kernel after boot. It initializes the system, mounts file systems, starts services, and becomes the parent of all other processes.


Question 18​

Which command displays the process tree?

See explanation

Correct answer: pstree

Explanation: pstree displays processes as a tree, showing parent-child relationships. Options: pstree -p (with PIDs), pstree -u (with users).


Question 19​

What is a runlevel in traditional Linux systems?

See explanation

Correct answer: A system operating mode defining which services are active

Explanation: Runlevels (0-6) define which services are started. Examples: 0 (shutdown), 1 (single-user mode), 3 (multiuser without GUI), 5 (multiuser with GUI). systemd uses "targets" instead.


Question 20​

Which command provides detailed information about a specific process?

See explanation

Correct answer: ps -p PID or cat /proc/PID/status

Explanation: ps -p PID -f displays details of a process. You can also check /proc/PID/status or /proc/PID/stat for detailed information.


Question 21​

What is memory paging in Linux?

See explanation

Correct answer: The mechanism that allows storing memory pages on disk (swap) and loading them into RAM when needed

Explanation: Paging allows the kernel to manage virtual memory by moving memory pages between RAM and swap as needed, enabling more processes to run than physical RAM would allow.


Question 22​

Which command shows real-time CPU usage?

See explanation

Correct answer: top or htop

Explanation: top displays processes in real-time with CPU and memory usage. htop is an improved and more interactive version. You can also use vmstat or iostat.


Question 23​

What is the /sys file system in Linux?

See explanation

Correct answer: A virtual file system that exposes information about hardware and drivers

Explanation: /sys (sysfs) is a virtual file system that exposes information about devices, drivers, and kernel configuration. It allows interaction with hardware from user space.


Question 24​

Which command unloads a kernel module?

See explanation

Correct answer: modprobe -r or rmmod

Explanation: modprobe -r module_name unloads a module and its dependencies if they are no longer used. rmmod unloads a module directly but does not handle dependencies.


Question 25​

What is an orphan process in Linux?

See explanation

Correct answer: A process whose parent process has terminated before it

Explanation: An orphan process is adopted by init (PID 1) when its parent terminates. Init becomes its new parent and reaps the zombie process when it terminates.


Question 26​

Which command shows system logs on Ubuntu 24.04?

See explanation

Correct answer: journalctl

Explanation: journalctl is the command to view systemd logs. Options: journalctl -u service (logs of a service), journalctl -f (real-time follow), journalctl -b (since last boot).


Question 27​

What is the boot process in Linux?

See explanation

Correct answer: The sequence of events from hardware startup to a fully operational system

Explanation: The boot process includes: BIOS/UEFI → Bootloader (GRUB) → Kernel → Init/systemd → Services → Operational system. Each step initializes specific components.


Question 28​

Which command shows kernel messages at startup?

See explanation

Correct answer: dmesg

Explanation: dmesg displays kernel messages (ring buffer). You can also use journalctl -k to view kernel messages via systemd.


Question 29​

What is IPC (Inter-Process Communication) in Linux?

See explanation

Correct answer: A mechanism allowing processes to communicate and share data

Explanation: IPCs include: pipes, FIFOs, message queues, shared memory, semaphores, sockets. They allow processes to communicate and synchronize their actions.


Question 30​

What is the main difference between systemd and SysV init?

See explanation

Correct answer: systemd starts services in parallel, automatically manages dependencies, and offers more features (timers, sockets, etc.)

Explanation: systemd is more modern: parallel startup (faster), automatic dependency management, units for timers, sockets, mounts, and better process tracking.


Quiz Result​

Congratulations on completing the Module 2 quiz!

Score:

  • 25-30 correct answers: Excellent! You master Linux architecture.
  • 20-24 correct answers: Very good! Review the components where you had difficulties.
  • 15-19 correct answers: Good! Review the chapters on architecture.
  • Less than 15: Recommended to review the module before continuing.

Next Steps​

Now that you have validated your knowledge:

Module 3: File System
Practical Labs: Practice the architecture with Module 2 labs


Quiz created on: December 2024 - Tested on Ubuntu 24.04