1Strictly speaking, what does the word 'Linux' refer to?
Explanation
Linux is technically only the kernel. What people commonly call 'Linux' (Ubuntu, RHEL, etc.) is really GNU/Linux — the kernel bundled with GNU userland tools and a package manager.
2Which of these is the correct relationship between a distribution and the kernel?
Explanation
Distributions (Ubuntu, RHEL, Alpine, etc.) all build on the Linux kernel but differ in package manager, file layout conventions, and default configuration.
3What is the fundamental difference between kernel space and user space?
Explanation
Kernel space runs with full privileges and direct hardware access. User-space applications are restricted and must request kernel services via system calls.
4A user-space program calls open(), read(), and write() to interact with a file. What are these calls?
Explanation
open(), read(), and write() are system calls — the mechanism by which user-space code requests privileged kernel services like file I/O.
5What is an inode?
Explanation
An inode stores a file's metadata (permissions, owner, size, timestamps) and pointers to its data blocks. The filename is a separate directory entry pointing to the inode.
6What happens to a hard link when the original file is deleted?
Explanation
A hard link points to the same inode as the original. Data isn't freed until the last hard link referencing that inode is deleted.
7What does a symbolic link actually store?
Explanation
A symbolic link is a small file containing a path to its target. If the target is deleted or moved, the symlink becomes a dangling reference.
8What does `chmod 644 file.txt` set the permissions to?
Explanation
644 in octal breaks down to owner=6(rw-), group=4(r--), others=4(r--) — the standard permission set for a regular, non-executable file.
9What does the setuid bit do when set on an executable?
Explanation
setuid makes a binary run with its OWNER's privileges. This is how /usr/bin/passwd (owned by root) lets any user update /etc/shadow, which normally requires root.
10What is the purpose of the sticky bit on a directory like /tmp?
Explanation
The sticky bit on a shared directory like /tmp stops users from deleting or renaming each other's files, even though everyone has write access to the directory itself.
11If umask is set to 0022, what permissions will a newly created FILE have by default?
Explanation
Files default to 666 before umask is applied. Subtracting 022 gives 644 (owner rw-, group r--, others r--).
12What is a zombie process?
Explanation
A zombie has finished executing, but its parent hasn't called wait() to reap its exit status — it holds only a PID table entry until reaped.
13What happens to an orphan process (whose parent died before it did)?
Explanation
Orphaned processes are automatically re-parented to PID 1, which is responsible for reaping them when they eventually exit.
14What is the key difference between SIGTERM and SIGKILL?
Explanation
SIGTERM (15) is the default, catchable signal that lets an application shut down gracefully. SIGKILL (9) cannot be caught or ignored — the kernel terminates the process immediately.
15In `nice` values, which number represents the HIGHEST scheduling priority?
Explanation
Nice values range from -20 (highest priority) to 19 (lowest). The naming is intentionally inverse — a 'nicer' process yields more CPU to others, hence lower priority for itself.
16What command brings a suspended (Ctrl+Z'd) background job back to the foreground?
Explanation
`fg %1` resumes job 1 in the foreground. `bg %1` resumes a stopped job but keeps it running in the background.
17During Linux boot, what is the purpose of initramfs?
Explanation
initramfs is a minimal, temporary filesystem loaded into memory by the bootloader, containing just enough kernel modules to locate and mount the actual root filesystem (e.g., on LVM or an encrypted volume).
18What is PID 1 on a modern systemd-based Linux system?
Explanation
systemd is started by the kernel as the very first userspace process (PID 1), and every other process descends from it.
19After manually editing a systemd .service file, what command must be run before the changes take effect?
Explanation
`systemctl daemon-reload` tells systemd to reload unit file definitions from disk. Without it, systemd keeps using the old, cached definition even after restarting the service.
20What is the difference between `After=` and `Requires=` in a systemd unit file?
Explanation
After=/Before= are purely about ordering. Requires= (and the softer Wants=) express actual dependency relationships between units.
21Which command lets you view logs from the PREVIOUS boot, after an unexpected reboot?
Explanation
`journalctl -b` shows the current boot's logs; `journalctl -b -1` reaches back one boot — essential for investigating what happened right before an unexpected reboot.
22What is the purpose of /etc/fstab?
Explanation
/etc/fstab defines which devices/partitions get mounted where, automatically, when the system boots. A bad entry here is a classic cause of a server dropping into emergency mode.
23What is the core difference between the `df` and `du` commands?
Explanation
df reports usage as tracked by the filesystem itself, while du sums the sizes of files it can see. A mismatch usually means a deleted file is still held open by a running process.
24On an XFS filesystem, which command is correct for growing it after extending the underlying logical volume?
Explanation
Unlike resize2fs (used for ext4, which can target the device), xfs_growfs operates on the mounted filesystem path, not the raw block device.
25What is the main advantage of RAID 1 over RAID 0?
Explanation
RAID 1 mirrors data across drives, surviving a single disk failure. RAID 0 stripes data for speed with zero redundancy — any disk failure loses all data.
26What does a high, sustained value in the `si`/`so` columns of `vmstat` indicate?
Explanation
si (swap in) and so (swap out) show active swapping. Sustained non-zero values under load are a strong signal of memory pressure, which severely impacts latency.
27Where are hashed user passwords stored on a modern Linux system?
Explanation
/etc/passwd holds an 'x' placeholder in the password field; the actual hash lives in /etc/shadow, which is readable only by root, for security.
28What is the key difference between `sudo` and `su`?
Explanation
sudo is designed for per-command, audited privilege escalation. su switches to a full session as another user and requires that user's own password.
29What mistake does `usermod -G docker deploy` (without -a) make?
Explanation
Without -a (append), usermod -G overwrites the user's entire supplementary group list instead of adding to it — a classic and dangerous mistake.
30Which Linux file type is created by the `mkfifo` command?
Explanation
mkfifo creates a named pipe (FIFO), letting two unrelated processes communicate through a filesystem path rather than an anonymous shell pipe.
31What is the fundamental difference between a character device and a block device?
Explanation
Character devices transfer data as a stream; block devices support random access in fixed-size blocks, which is why only block devices are partitioned and formatted with filesystems.
32What does `grep -v "debug" app.log` do?
Explanation
The -v flag inverts the match, printing every line that does NOT match the given pattern.
33What does `sed -i 's/foo/bar/g' file.txt` do?
Explanation
The 'g' flag replaces every occurrence per line (not just the first), and -i edits the file in place with no output, and no undo unless a backup suffix is given.
34In `awk -F: '{print $1}' /etc/passwd`, what does `-F:` do?
Explanation
-F sets awk's field separator. /etc/passwd uses colons to separate fields, so -F: is required to correctly extract, e.g., the username as $1.
35Why must input be sorted before piping into `uniq`?
Explanation
uniq only collapses consecutive duplicate lines. If matching lines aren't adjacent, sort must be run first — hence the common `sort | uniq -c` pattern.
36Which tar flags create a gzip-compressed archive verbosely?
Explanation
-c creates an archive, -z compresses with gzip, -v is verbose, -f specifies the archive filename — czvf is the standard combination for creating a .tar.gz.
37Why should `rsync --delete` always be tested with `--dry-run` first?
Explanation
--delete mirrors the destination exactly to the source, deleting anything extra in the destination. Testing with --dry-run first previews exactly what would be deleted before it actually happens.
38What is the difference between `apt update` and `apt upgrade`?
Explanation
A very common point of confusion: 'update' only refreshes what apt KNOWS is available; 'upgrade' is the step that actually installs newer package versions.
39Which two Linux kernel features make containers (like Docker) possible without a separate guest kernel?
Explanation
Namespaces isolate what a process can see (PID tree, network, mounts), and cgroups limit what it can use (CPU, memory, I/O). Containers are regular Linux processes constrained by these two kernel features, sharing the host's single kernel.
40A Kubernetes pod was OOMKilled. Where would you look on the NODE to confirm this at the kernel level?
Explanation
OOMKilled is enforced by the kernel's OOM killer, part of the memory management subsystem. dmesg/journalctl -k on the node shows the actual kernel-level kill event, which kubectl describe only surfaces indirectly.
Correct: 0 Incorrect: 0
Answered: 0 / 40
🎉
Quiz Complete!
You answered all 40 questions.
Scenario Based
Scenario-based questions for Linux are coming soon.
Add More Questions to This Guide
Know a question that should be here? Share it and help the community!