Module 1 — What Linux Is
Updated 2 September 2026
Every machine you will touch in DevOps — cloud instances, CI runners, Kubernetes nodes — runs Linux. This module builds the mental model everything else stands on: what an operating system is, what the kernel does, what a distribution is, and how to talk to Linux through a shell.
Legend used throughout: 🧠 concept → 🧩 analogy → 🧪 exercise → ✅ expected result (hidden) → 🎯 interview questions (hidden)
This is the first module — nothing else is required, and no prior knowledge is assumed. You do need a Linux command line to practice on. Any one of these works: the Terminal app on a Linux desktop, an Ubuntu virtual machine, Windows Subsystem for Linux (install guide), or a free-tier cloud VM. All expected outputs in this track come from Ubuntu 24.04. macOS's Terminal is close but not Linux — most commands here work there, but outputs differ in small ways.
Part A — What Linux actually is
A1. What an operating system does
🧠 A computer, by itself, is astonishingly dumb. The processor (CPU) executes instructions. Memory (RAM) holds data while the power is on. The disk stores data permanently. The network card moves bytes in and out. None of these parts knows what a file is, what a user is, or what a program is. Something has to coordinate them.
That something is the operating system (OS). It is software that starts when the machine powers on and stays running until shutdown. It has three jobs:
- Run programs. Load them into memory, give each a fair slice of CPU time, clean up when they finish.
- Own the hardware. Programs never talk to the disk or the network card directly. They ask the OS, and the OS does it on their behalf.
- Keep order. One misbehaving program must not overwrite another program's memory or read data it should not see.
Linux is an operating system. So are Windows and macOS. All three do these same three jobs, with different designs and histories.
A large office building has one building manager. Tenants (programs) do not rewire the electricity or reprogram the lifts themselves — they file requests, and the manager's staff does the physical work. The manager also assigns offices (memory), schedules the loading dock (disk access), and evicts tenants who damage the building (misbehaving programs).
Where the analogy stops working. A building manager makes a few decisions an hour and can be argued with. The OS makes millions of decisions per second, and a program cannot negotiate, bribe, or sneak past it — the CPU hardware itself enforces who is in charge.
🧪 Exercise A1.1 — Meet your terminal
# Open your terminal application. You will see a line of text ending in $ — the prompt.
# Type each command below and press Enter after each one.
whoami # prints the name of the user you are logged in as
date # prints the current date and time✅ Expected result — click to reveal
Two short outputs, one per command:
zaeem
Thu Sep 3 09:14:52 +08 2026What to read out of it:
- whoami prints one word: your username. Yours will not be zaeem — it is whatever name you (or your cloud provider) created. On many cloud VMs it is ubuntu. If it says root, you are logged in as the all-powerful administrator — Module 4 explains why that deserves respect.
- The date line has six fields: weekday, month, day, time, timezone, year. The timezone is whatever your machine is set to — a cloud VM usually says UTC while a laptop says your local zone. Same moment, different label.
- Notice the double space between Sep and 3 — the day is padded to two characters. Small alignment quirks like this are normal in Linux output; later modules teach tools that handle them.
- After each command finishes, the prompt comes back. That is how you know the command is done and the shell is ready for the next one.
A2. The kernel and everything above it
Goes deeper: the kernel/userspace boundary and system calls get a full theory module in the companion track — Module 01 — Kernel, User Space & the System Call Boundary. Read it after finishing this module, not instead of it.
🧠 Inside the operating system, one program matters more than all the others: the kernel. It is the first real program to run at power-on, and it never exits. The kernel is the only software allowed to touch hardware directly. Everything else — your terminal, your commands, every application — runs in userspace: a fenced-off area with no direct hardware access.
When a userspace program needs something physical — read a file, send a network packet, get more memory — it makes a system call: a formal request to the kernel. The kernel checks that the request is allowed, does the work, and hands back the result. Every file read and every packet sent on every Linux machine in the world goes through this one gate.
Diagram source
flowchart TD
A["You"] --> B["Terminal<br>(draws text on screen)"]
B --> C["Shell<br>(reads your commands)"]
C --> D["Programs<br>(date, whoami, ...)"]
D -->|"system calls"| E["Kernel"]
E --> F["Hardware<br>(CPU, RAM, disk, network)"]A restaurant has a dining room (userspace) and a kitchen (the kernel). Diners (programs) never cook. They hand orders to waiters (system calls), and the kitchen prepares the food using equipment the diners never touch. The kitchen also decides which orders go first — fairness is its job, not the diners'.
Where the analogy stops working. A determined diner could physically barge into a real kitchen. In Linux, the CPU hardware itself runs userspace in a restricted mode — a program does not have the ability to execute kernel-only instructions, any more than a radio can decide to become a microwave.
🧪 Exercise A2.1 — Ask the kernel to introduce itself
uname # prints the kernel's name
uname -r # -r is an OPTION: print the kernel Release (its version) instead
uname -a # -a prints All system information on one line✅ Expected result — click to reveal
Linux
6.8.0-79-generic
Linux myhost 6.8.0-79-generic #79-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 24 21:15:23 UTC 2026 x86_64 x86_64 x86_64 GNU/LinuxWhat to read out of it:
- uname alone answers with the kernel's name: Linux. You have now confirmed, from the inside, what this machine runs.
- uname -r prints the kernel version. Yours will differ — 6.8.0-79-generic means kernel series 6.8, Ubuntu build 79. Any 5.x or 6.x kernel is modern.
- The -a line packs several fields together: kernel name, this machine's hostname, the release again, the build description, then the CPU architecture repeated (x86_64 on Intel/AMD machines, aarch64 on ARM — common on cloud servers and Apple hardware). The final word, GNU/Linux, previews Part D.
- Version numbers in this track will never exactly match yours. That is expected — read the shape of the output, not the digits.
A3. Distributions — how Linux reaches you
🧠 The kernel alone is not a usable system — it has no commands, no installer, nothing for a person to interact with. A distribution (distro for short) is a complete operating system assembled around the Linux kernel: the kernel, a shell, hundreds of standard tools, an installer, a package manager (the tool that installs software — Module 8's subject), plus a release calendar and support promises.
Hundreds of distributions exist, but they cluster into a few families that matter at work:
| Family | Well-known members | Where you meet it |
|---|---|---|
| Debian family | Debian, Ubuntu, Linux Mint | The most common choice for cloud servers and CI systems |
| Red Hat family | RHEL, Fedora, Rocky Linux, AlmaLinux, Amazon Linux | Large enterprises, banks, telecoms, AWS defaults |
| Independent | Alpine, Arch, openSUSE | Alpine is everywhere in containers because it is tiny |
Members of one family share tooling and habits; across families, the everyday commands you are learning stay the same, but system administration details differ. This track uses Ubuntu, and flags family differences when they bite.
Car makers buy the same engine and build very different cars around it: different dashboards, seats, service plans. The kernel is the engine; each distribution is a car built around it. Learning to drive one largely teaches you to drive them all.
Where the analogy stops working. Rival cars never share one engine — distributions literally do. The same open-source kernel, sometimes the very same version, sits inside Ubuntu, RHEL, and Alpine. And unlike a car owner, you are free to swap the engine version yourself.
Every modern distribution identifies itself in one standard place: a file called /etc/os-release. To look at it, we need one command ahead of schedule: cat prints a file's contents on the screen. Files and the strange-looking /etc/ address are exactly what Module 2 teaches — for now, type it as shown.
🧪 Exercise A3.1 — Which Linux is this?
cat /etc/os-release # cat = print a file's contents; this file identifies the distribution✅ Expected result — click to reveal
PRETTY_NAME="Ubuntu 24.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.4 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logoWhat to read out of it (on another distro the values differ, the field names do not):
- ID=ubuntu — the machine-readable distro name. Scripts test this field, never the pretty one.
- ID_LIKE=debian — "treat me like a Debian system". This is how tools know Ubuntu belongs to the Debian family.
- VERSION_ID="24.04" — the release number. Ubuntu numbers releases by date: year 24, month 04. LTS means Long Term Support — five years of fixes, which is why servers run LTS versions almost exclusively.
- The URLs and logo lines are informational padding — real output is often messier than you need, and part of the skill is knowing which lines to ignore.
A4. The terminal and the shell
🧠 Two different programs cooperate every time you type a command, and interviewers love asking which is which.
The terminal is the window: it draws text on screen and sends your keystrokes onward. It understands nothing about commands.
The shell is the program running inside that window. It prints the prompt, reads the line you typed, figures out what you meant, starts the right program, and shows you the result. The shell you will meet on nearly every server is bash. Others exist — zsh (the macOS default), sh (the minimal ancestor), fish — same job, different comfort levels.
Two prompt conventions to recognise on sight: a prompt ending in $ means a normal user; a prompt ending in # means the administrator, root. Commands in documentation are shown with $ or # for this reason — you never type that character.
One more thing before the exercise: in the shell, a word starting with $ (like $SHELL) is a variable — a named placeholder. The shell replaces it with its stored value before running the command. Variables get a full treatment in Module 5; today we only peek at one.
At an international conference, the booth with its glass, microphone, and headsets is the terminal. The interpreter sitting inside is the shell: they hear your sentence, interpret it by fixed grammar rules, and pass instructions on. Replace the interpreter (use a different shell) and the same booth works fine.
Where the analogy stops working. A human interpreter guesses your intent and smooths over small mistakes. The shell applies its grammar with zero goodwill — a missing space or a wrong letter does not get fixed, it gets executed wrongly or rejected.
🧪 Exercise A4.1 — Which shell is this?
echo hello # echo = print its arguments back; the shell's "say" command
echo $SHELL # $SHELL is a variable holding your login shell's location
bash --version # every program tells you its version with --version✅ Expected result — click to reveal
hello
/bin/bash
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.What to read out of it:
- echo hello prints exactly its argument. Trivial now, indispensable later — echo is how you will check what the shell actually sees before running something dangerous.
- echo $SHELL did not print the word $SHELL. The shell swapped the variable for its value — /bin/bash, the address of the bash program — before echo even ran. That swap-then-run order is the single most important shell behaviour, and Module 5 is built on it.
- bash --version answers with a version block. The first line is the one you read: bash 5.2. The GNU prefix and the license lines are the history of Part D showing up in your terminal.
- If your $SHELL says /usr/bin/zsh or similar, you are in a different shell — everything in this module still works, but install a system with bash before Module 5.
Part A — Interview questions
🎯 "What is the Linux Kernel?" — asked verbatim in GeeksforGeeks' Linux Interview Questions (70+ questions, updated July 2026)
The kernel is the core program of the operating system: the first real program to run at power-on and the only one with direct access to hardware. It schedules which program uses the CPU and when, manages memory, drives devices, and enforces the boundary between userspace and itself. Programs get hardware work done by making system calls — formal requests the kernel validates and performs.
The details that separate candidates: naming system calls as the precise boundary between userspace and kernel; knowing Linux is a monolithic kernel (drivers run inside it) that stays flexible through loadable modules; and pointing out that every distribution ships the same upstream kernel, differing mainly in version and patches. Average answers stop at "it connects software to hardware".
🎯 "What do you mean by Linux? Explain its features." — asked verbatim in InterviewBit's Linux Interview Questions (2025)
Linux is a family of open-source, Unix-like operating systems built on the Linux kernel. Strictly, Linux is the kernel; in practice, the name covers whole distributions. Key features: open source — the code is public and modifiable under the GPL; multi-user — several people can use one machine at once with their own files and permissions (Module 4 shows how); multitasking — the kernel shares the CPU across many running programs; portable — it runs on everything from a Raspberry Pi to the entire top-500 supercomputer list; and stable — servers routinely run for years without a reboot.
The details that separate candidates: saying "Linux is technically the kernel; distributions make it an OS" — it signals precision; and grounding "portable" in something concrete (x86_64 and ARM cloud instances, Android's kernel) rather than reciting adjectives.
🎯 "What are the basic components of Linux?" — asked verbatim in InterviewBit's Linux Interview Questions (2025)
Bottom to top: hardware — CPU, memory, disks, network; the kernel — owns the hardware, schedules everything, exposes system calls; system libraries — shared code (chiefly the C library) that wraps system calls so programs don't make them by hand; system utilities — the standard commands like date, cat, uname; and the shell — the interpreter between you and the rest. Applications sit on top.
The details that separate candidates: being able to place each layer in order and name the interface between adjacent layers (you → shell → programs → system calls → kernel → hardware). Candidates who can draw this diagram from memory rarely stumble on any follow-up.
🎯 "What is Linux Shell? What types of Shells are there in Linux?" — asked verbatim in InterviewBit's Linux Interview Questions (2025)
The shell is a userspace program that reads command lines, interprets them by fixed grammar rules — expanding variables, splitting words — and runs the requested programs. It is not part of the kernel and not the terminal window. Common shells: bash (the server default nearly everywhere), zsh (macOS's default, popular interactively), ksh and tcsh (older, still in legacy shops), fish (friendly, not standards-compatible), and sh (the minimal POSIX baseline that scripts target for portability).
The details that separate candidates: the terminal/shell distinction stated crisply; knowing why sh still matters (portable scripts, and on many systems /bin/sh is a different, stricter program than bash — a classic source of "works on my machine" bugs, revisited in Module 9).
Part B — Running commands like you mean it
B1. The anatomy of a command
🧠 First, read your prompt. A typical Ubuntu prompt looks like zaeem@myhost:~$ — your username, @, the machine's name, :, where you are (the ~ is explained in Module 2), and the $ that means "normal user, ready".
Every command line has the same grammar:
command [options] [arguments]- The command comes first: which program to run.
- Options start with - and change how the command behaves.
- Arguments are what to act on or with.
- Spaces separate the pieces. The shell splits your line into words wherever it sees spaces — this splitting is the shell's first act, and half of all beginner surprises trace back to it.
Square brackets in documentation mean "optional" — you don't type the brackets. So date runs happily with no options and no arguments at all.
"Large oat-milk latte, decaf." The drink name is the command, decaf and oat-milk are options (they change how), large is an argument (it says what). The barista repeats nothing back unless something is wrong with the order — silence, then coffee.
Where the analogy stops working. A barista uses context and goodwill: "a latte... make it decaf" still works. The shell has neither. It applies its grammar to exactly the characters you typed, and one wrong letter makes it a different order entirely.
🧪 Exercise B1.1 — One command, three behaviours
date # no options, no arguments: local time, default format
date -u # -u option: same moment, shown in UTC
date "+%H:%M" # an argument starting with + tells date the FORMAT to print
# the quotes keep it one single word for the shell (Module 5 explains why)✅ Expected result — click to reveal
Thu Sep 3 09:14:52 +08 2026
Thu Sep 3 01:14:52 UTC 2026
09:14What to read out of it:
- Line 1 vs line 2: the same instant, printed in your local zone and in UTC. The hour and the zone label change together — here, 09:14 in Malaysia is 01:14 UTC. Servers and logs live in UTC; your laptop lives in local time. Keeping those straight becomes second nature in DevOps.
- Line 3: the format argument took over completely. %H means hours, %M minutes, and everything else vanished. Options tweak behaviour; arguments can redefine the whole output.
- Nothing was printed about "success" anywhere — the output is the result.
🧪 Exercise B1.2 — Watch the shell split words
echo one two three # type several spaces between "two" and "three"✅ Expected result — click to reveal
one two threeWhat to read out of it:
- Your extra spaces are gone. The shell split the line into words — echo, one, two, three — and the number of spaces between words was thrown away in the process. echo then printed its arguments joined by single spaces.
- Lesson: the command never saw your spacing. The shell hands programs a list of words, not your original line. When quoting arrives in Module 5, this is the behaviour quotes exist to control.
B2. Short options, long options
🧠 Most options come in two spellings. Short: a dash and one letter, -r. Long: two dashes and a word, --kernel-name. They do the same thing; short is for typing, long is for scripts that humans must read later. Short options can be combined: uname -sr means uname -s -r. That is why order and spacing around dashes matter so much — -sr is two options, but --sr would be one (misspelled) long option.
Waiters write "B/T x2 GF" on tickets: terse codes for the kitchen, because they write hundreds a shift. The menu spells out "bacon and tomato sandwich, gluten-free" for customers. Short options are ticket shorthand; long options are the menu text. Same dish.
Where the analogy stops working. Kitchen shorthand is one shared convention per restaurant. Each Linux program invents its own letters — -h is help in one tool, "human-readable" in another, and an error in a third. The only authority is that program's own documentation.
🧪 Exercise B2.1 — Two spellings, one meaning
uname -s # short: kernel name ("s" for system)
uname --kernel-name # long: identical behaviour, self-documenting
uname -r # short: kernel release
uname -sr # combined: -s and -r in one word✅ Expected result — click to reveal
Linux
Linux
6.8.0-79-generic
Linux 6.8.0-79-genericWhat to read out of it:
- Lines 1 and 2 are identical — proof that -s and --kernel-name are the same switch in two spellings.
- Line 4 shows combining: -sr produced both values, space-separated, in one line. In scripts you will see the long forms on purpose: uname --kernel-name needs no comment explaining it.
B3. When commands fail — and why that's useful
🧠 You will now break things on purpose. Error messages are not noise to scroll past — they are structured information: who is complaining, what it could not do, and usually what to try next. Learning to read them calmly is a core professional skill; the difference between juniors and seniors in an incident is largely what they do in the first ten seconds after an error appears.
One rule to install permanently: Linux is case-sensitive, everywhere. echo, Echo, and ECHO are three different names, and only the first exists.
A phone number one digit off does not reach "almost the right person" — it reaches a stranger or a dead line. Command names work the same way: near-misses have no partial credit.
Where the analogy stops working. A misdial can silently connect you to the wrong someone. The shell fails loudly instead, and that is a gift — the scary version is the command that exists but isn't the one you meant. That is why you check with the help tools of Part C before running something unfamiliar.
🧪 Exercise B3.1 — A typo, on purpose (this one is supposed to fail)
daet # deliberate misspelling of date✅ Expected result — an error, on purpose — click to reveal
bash: daet: command not found(On a desktop or WSL Ubuntu you may instead see a friendlier, multi-line Command 'daet' not found, did you mean: command 'date'… — Ubuntu adds a suggestion helper on top of the very same failure. Same lesson either way. Inside scripts, bash also adds a line number.)
What to read out of it:
- The reporter is the shell, not a program — daet never ran, because the shell searched everywhere it knows for a program by that name and found nothing. Where exactly it searches is the PATH, a Module 5 topic with its own war stories.
- command not found therefore always means one of three things: you misspelled it, it isn't installed, or it lives somewhere the shell doesn't look. Diagnosing which is a five-second job by the end of Part C.
🧪 Exercise B3.2 — The case trap (this one is supposed to fail)
Echo hello # capital E✅ Expected result — an error, on purpose — click to reveal
bash: Echo: command not foundWhat to read out of it:
- Same error as the typo — because to Linux, a wrong capital is a typo. Echo and echo are unrelated names.
- This applies to filenames too (Report.txt and report.txt are different files — Module 2), which is a genuine hazard for anyone arriving from Windows, where case doesn't distinguish names.
🧪 Exercise B3.3 — When the program itself complains (this one is supposed to fail)
date -x # an option date does not have✅ Expected result — an error, on purpose — click to reveal
date: invalid option -- 'x'
Try 'date --help' for more information.What to read out of it:
- The reporter this time is date itself — the shell found the program and ran it; the program then rejected the option. Compare with B3.1, where the shell never found anything to run. Asking "who is complaining?" is the first move in reading any error.
- The second line is the gift: the error names the exact next command to run. Well-behaved tools do this, and Part C is about taking them up on the offer.
Part B — Interview questions
🎯 "What is BASH?" — asked verbatim in both InterviewBit's and Tecmint's Linux interview question sets (2025)
Bash — the Bourne Again SHell — is the GNU project's command interpreter and the default shell on most Linux distributions. It reads command lines (interactively or from script files), applies the shell grammar — variable expansion, word splitting, redirection (Module 5) — and runs programs. The name is a pun: it replaced the 1970s Bourne shell (sh), staying compatible while adding history, tab-completion, arithmetic, and richer scripting.
The details that separate candidates: knowing bash is a shell, not the shell — and that on Debian and Ubuntu, /bin/sh is deliberately not bash but a smaller shell called dash, which is why some scripts break when run "the same way" on different systems (a story Module 9 finishes).
🎯 "What are shells used in Linux?" — asked verbatim in Tecmint's 15 Basic Linux Interview Questions (updated May 2025)
The ones to name: bash — default on most distros, the assumed shell of nearly every script; zsh — bash-compatible for daily use, better interactive comforts, macOS's default since 2019; ksh — the Korn shell, still common on legacy Unix; tcsh/csh — C-shell family, different grammar, mostly historical; fish — friendly but deliberately non-POSIX; dash — minimal and fast, used as /bin/sh on Debian-family systems for running scripts, not people.
The details that separate candidates: separating interactive shells (what humans prefer — zsh, fish) from scripting targets (what automation assumes — bash, POSIX sh), and knowing which shell a script gets is decided by the script itself via its first line (the shebang — taught properly in Module 9).
🎯 "How do you find out which user is currently logged in?" — asked verbatim in Adaface's 96 Linux Commands interview questions (September 2024)
whoami prints the user the current shell is running as — the answer to "who am I, right here". The related who lists all users with open sessions on the machine, with their login times and where they connected from. The distinction matters: on a shared server the two answer different questions.
The details that separate candidates: mentioning that whoami reports the effective user — so after you switch identities with sudo (Module 4), whoami says root, which is exactly how you verify a privilege switch worked before running something irreversible.
Part C — Getting help without leaving the terminal
C1. --help: the leaflet in the box
🧠 Nearly every Linux command answers --help with a usage summary: one screen listing what it does and which options it takes. This is the fastest help there is, and it describes the exact version installed on this machine — which a web tutorial never guarantees.
You also need to read the notation. A usage line like date [OPTION]... [+FORMAT] is a compact grammar: square brackets mean optional, ... means repeatable, and capitalised words are placeholders you replace. You never type the brackets or dots.
Every appliance ships with a folded leaflet in the box: terse, complete, written by the manufacturer for exactly that model. --help is the leaflet — always in the box, always matching your model, never as friendly as a video tutorial.
Where the analogy stops working. You can read a leaflet before buying. --help only exists once the program is installed and working — for anything not on the machine yet, you are back to the web.
🧪 Exercise C1.1 — Read a usage line properly
date --help # prints usage; more than one screen on most systems — just let it scroll for now✅ Expected result — click to reveal
The output starts like this (then continues with a long option list):
Usage: date [OPTION]... [+FORMAT]
or: date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
Display date and time in the given FORMAT.
With -s, or with [MMDDhhmm[[CC]YY][.ss]], set the date and time.What to read out of it:
- Line 1 decoded: date, optionally any number of options, optionally one format argument starting with +. That is everything you did in B1.1, formalised.
- Line 2 is an alternative form, and it contains a warning hidden in plain sight: date can also set the system clock. The same tool that reads the time can change it — reading usage lines carefully is how you notice such things before they happen.
- The [-u|--utc|--universal] group shows a third notation: | means "any one of these spellings".
- Scrolling output is clumsy — Modules 3 and 5 teach pagers and pipes, the proper tools for long text.
C2. man pages: the reference shelf
🧠 For real depth there is man (short for manual): complete reference pages for commands, installed on the machine itself. man date opens the full manual for date in a scrollable viewer. The viewer keys you need on day one: Space for next page, arrow keys to scroll, /word then Enter to search forward for "word", n for the next match, and q to quit. (The viewer is a separate program called a pager — less by name — which Module 3 covers properly.)
Man pages share a fixed skeleton, so you always know where to look: NAME (one-line summary), SYNOPSIS (the usage grammar you just learned to read), DESCRIPTION, OPTIONS, and often EXAMPLES near the bottom.
A well-run workshop keeps a shelf of equipment manuals — one binder per machine actually present in the building, replaced whenever the machine is. man is that shelf: exhaustive, dry, and exactly matched to the inventory.
Where the analogy stops working. Binders outlive their machines; man pages are installed and removed with their software, automatically. The shelf is never stale — but it can be absent: see the orange callout below.
🧪 Exercise C2.1 — Navigate a real man page
man date # opens the manual; now practice INSIDE it:
# press Space a few times to page down
# type /universal and press Enter to search
# press n to jump to the next match
# press q to quit✅ Expected result — click to reveal
Your terminal switches into a full-screen reader beginning:
DATE(1) User Commands DATE(1)
NAME
date - print or set the system date and time
SYNOPSIS
date [OPTION]... [+FORMAT]What to read out of it:
- The title line DATE(1) shows the page name and, in parentheses, its section number — the subject of C3. User Commands is that section's title.
- /universal jumped you to the -u option's documentation — searching inside man pages beats scrolling every time.
- If you seem stuck in the viewer: press q. Nothing is broken. "How do I get out of this?" is every beginner's first man-page memory.
- If instead you got man: command not found or a "minimized system" notice — read the next callout; your machine is a minimal build.
C3. Manual sections — one name, several pages
🧠 The manual is split into numbered sections by kind of content. The ones DevOps engineers actually use: 1 — user commands; 5 — file formats and configuration files; 8 — system administration commands; 7 — overviews and conventions. (Sections 2 and 3 document programming interfaces; 4 and 6 you will rarely touch.)
The catch: the same name can exist in several sections. passwd is both a command (section 1) and a configuration file format (section 5 — it describes /etc/passwd, the user-account list you will study in Module 4). Plain man passwd shows the first match in man's configured section search order — on Ubuntu that order begins with section 1, so you get the command. To get the file format you must ask for the section: man 5 passwd. Two tools reveal what exists: whatis name lists every section a name appears in, and man -f name is the same thing by another spelling.
A library holds two books titled "Java": a travel guide on the geography floor and a programming manual on the computing floor. Ask for "Java" with no floor and you get whichever the catalogue lists first — confidently, with no warning that another exists.
Where the analogy stops working. A human librarian would mention the other book. man mentions nothing — the wrong section reads exactly as authoritative as the right one, which is how engineers end up following command documentation when they needed the config-file format.
🧪 Exercise C3.1 — Two pages, one name
whatis passwd # list every manual page named "passwd"
man 5 passwd # open the section-5 page: the FILE FORMAT, not the command
# (press q to quit when done)✅ Expected result — click to reveal
passwd (1) - change user password
passwd (5) - the password fileThen man 5 passwd opens with:
PASSWD(5) File Formats and Configuration PASSWD(5)
NAME
passwd - the password fileWhat to read out of it:
- whatis returned two lines — two different manuals behind one name. The one-line summaries alone tell you which you want.
- In the section-5 page's title bar, File Formats and Configuration confirms you are reading about a file, not a command. Glancing at that title bar every time you open a man page is a habit that costs nothing and prevents real mistakes.
- On some systems whatis passwd shows extra entries (e.g. openssl-passwd(1ssl)) — more installed software means more manuals. Read the section numbers, not the count.
🧪 Exercise C3.2 — Asking for a page that isn't there (this one is supposed to fail)
man 9 date # there is no date page in section 9✅ Expected result — an error, on purpose — click to reveal
No manual entry for date in section 9What to read out of it:
- A precise error: not "date is unknown", but "not in that section". The page exists in section 1; you asked the wrong shelf.
- Compare the three failures you have now collected: shell can't find a command (B3.1), program rejects an option (B3.3), manual lacks a page (here). Three different reporters, three different fixes. Matching the error to its reporter is diagnosis.
C4. Finding commands you don't know yet
🧠 man works when you know the command's name. The reverse problem — "there must be a command for this, what's it called?" — is solved by apropos keyword, which searches all those one-line NAME summaries and prints every match. (man -k keyword is the identical operation by another spelling.)
And when a name behaves surprisingly, ask the shell what a name actually is with type name. Some commands (like echo) are builtins — implemented inside the shell itself rather than as separate programs, because they are either needed by the shell or faster that way.
man is asking for a book by exact title. apropos is asking the librarian "what do you have about preserving tomatoes?" — you get a list of candidate titles with one-line blurbs and choose.
Where the analogy stops working. The librarian searches full text and understands synonyms. apropos searches only the one-line summaries, literally — a command whose summary says "authentication" is invisible to a search for "login". If a search fails, re-try with the words a manual author would have used.
🧪 Exercise C4.1 — Search by topic, then inspect a name
apropos who # search: which manual summaries mention "who"?
type echo # what IS echo?
type man # ...and man?
type date # ...and date?✅ Expected result — click to reveal
who (1) - show who is logged on
whoami (1) - print effective user name
echo is a shell builtin
man is /usr/bin/man
date is hashed (/usr/bin/date)(Your apropos who list may be longer — every match containing "who" appears, sometimes including things like w(1).)
What to read out of it:
- apropos found commands you already know and, in one line each, told you what they do. This is how you discover tools without leaving the terminal.
- type echo says builtin: when you run echo, no separate program starts — the shell does it internally.
- type man gives an address on disk: /usr/bin/man — a real separate program. (Addresses like this are Module 2's subject.)
- date is hashed (...) is the messy, realistic case: "hashed" means the shell already looked date up earlier and cached the location so it needn't search again. It is the same kind of answer as man's, plus a performance note. Real output has texture like this; read past it to the substance. (In a brand-new terminal it would say date is /usr/bin/date — the hashed note only appears once you have run date in that session, as you did earlier.)
Part C — Interview questions
🎯 "What does the man command do, and how do you use it?" — asked verbatim in Adaface's 96 Linux Commands interview questions (September 2024)
man displays the reference manual for a command, file format, or system facility, straight from files installed on the machine — no network involved. Usage: man name for the default page, man 5 name to pick a section explicitly, man -f name (or whatis) to list all sections a name exists in, and man -k keyword (or apropos) to search summaries by topic. Inside the page: / searches, n repeats the search, q quits.
The details that separate candidates: explaining the section system unprompted — especially that man passwd and man 5 passwd are different documents — and noting that man pages document the installed version, which makes them more authoritative than web tutorials during an incident on that host.
🎯 "What is the command to show the manual page of another command?" — asked verbatim in Adaface's 96 Linux Commands interview questions (September 2024)
man command — e.g. man uname. Two neighbours worth naming in the same breath: command --help for the quick usage summary printed inline, and apropos keyword for when the name itself is unknown.
The details that separate candidates: an average answer stops at "man". A strong one presents the three help tools as a method — apropos to find the name, --help for a fast reminder, man for depth — and mentions that minimal servers and containers often ship without man pages, so relying on --help under pressure is a real operational habit, not laziness.
Part D — Where Linux came from, and where it runs
D1. Unix, GNU, and a student's hobby project
🧠 Three dates explain almost everything about why Linux looks the way it does.
1969 — Unix. At Bell Labs, Ken Thompson and Dennis Ritchie build Unix, an operating system with radical ideas: everything is a file, programs should be small tools that do one thing, and tools should connect to each other through plain text. Unix is proprietary — companies license it, and over decades it splinters into incompatible commercial variants. The POSIX standard is later written to pin down what a "Unix-like" system must provide, so software can run across all of them.
1983 — GNU. Richard Stallman starts the GNU project: rebuild all the Unix tools from scratch as free software — free as in freedom: anyone may read, change, and share the code, under a license called the GPL which requires that changes stay free too. By 1991 GNU has excellent tools (including bash and the commands you have been running) but no finished kernel.
1991 — Linux. Linus Torvalds, a Finnish student, writes a kernel as a hobby and releases it under the GPL. GNU's tools plus Linus's kernel make a complete free Unix-like OS. This joint origin is why you sometimes see the name "GNU/Linux", and why the kernel is licensed GPL version 2 to this day — meaning yes, you may legally read, modify, and redistribute it, and companies from Google to your bank do.
Unix is a famous restaurant's secret recipe. GNU cooks ate the dish for years and rewrote the recipe from taste, legally, from scratch — same dish, their own cookbook, given away free with one condition: anyone who improves it must share the improvement. Linux supplied the missing final page.
Where the analogy stops working. Recipes drift as they're recopied. Unix-like systems are held together by POSIX — a written standard that implementations deliberately conform to — which is why the commands in this module work almost identically on Linux, macOS, and BSD. Compatibility here is engineered, not accidental.
🧪 Exercise D1.1 — History, printed by your own machine
uname -o # -o prints the OPERATING SYSTEM name, not just the kernel name✅ Expected result — click to reveal
GNU/LinuxWhat to read out of it:
- Your machine itself names the two halves: GNU userland, Linux kernel. The 1983 and 1991 stories, in one word of output.
- Compare uname -s from B2.1, which printed only Linux — the kernel's name. Options select which question you are asking, and precision about the question is precision about the answer.
D2. Linux, Unix, macOS, Windows — telling them apart
Goes deeper: the theory of what any OS kernel does lives in the companion track — Operating Systems.
🧠 Interviewers ask this constantly, and sloppy answers are common. The precise picture:
| System | What it actually is | Relationship to Linux |
|---|---|---|
| Unix | The 1969 original and its certified commercial descendants (AIX, Solaris) | Ancestor in design; shares no code with Linux |
| Linux | A free, Unix-like kernel written independently in 1991, GPL-licensed | — |
| macOS | A certified Unix (BSD-derived userland, Apple's kernel) | Cousin: similar commands, different kernel — close enough to practice on, different enough to bite |
| Windows | An unrelated OS lineage (NT kernel) | No relation — but WSL runs a real Linux kernel inside a lightweight VM on Windows |
So: Linux is not Unix, contains no Unix code, and was never certified as Unix — but it follows the same design and (mostly) the POSIX standard, which is why your skills transfer across the whole family.
Spanish, Italian, and Portuguese descend from Latin: a speaker of one can mostly read the others. Unix is Latin; Linux, macOS, and the BSDs are the living languages. Windows is Mandarin — a rich language from an entirely separate family.
Where the analogy stops working. Natural languages drift apart forever. Unix-likes are actively pulled together by POSIX, and where they still differ (macOS ships older, BSD-flavoured versions of tools like sed — a trap revisited in Module 7), the differences are documented and testable rather than idiomatic.
🧪 Exercise D2.1 — Which hardware family am I on?
uname -m # -m prints the Machine hardware architecture✅ Expected result — click to reveal
x86_64What to read out of it:
- x86_64 means Intel/AMD 64-bit. The other answer you will meet constantly is aarch64 — 64-bit ARM, which is Apple Silicon Macs, Raspberry Pi, and the cheap ARM instance families at every cloud provider.
- Why care: pre-built software is compiled per architecture. A program built for x86_64 will not run on aarch64. When a download page offers two Linux versions, this command is how you pick.
D3. Where you will actually meet Linux in DevOps
🧠 Why does a DevOps track begin with Linux at all? Because in this line of work, Linux is not one option among several — it is the water you swim in. The default OS of every major cloud's virtual machines. The OS inside essentially every container. The OS of CI runners, Kubernetes nodes, routers, and load balancers. Android phones run the Linux kernel. When something is down at 3 a.m., the thing you are logging into is a Linux box.
And here is the practical consequence: those servers have no graphical desktop installed. Every skill in this track is keyboard-only on purpose — the terminal is not the hard way, it is the only way production machines are operated. (You will reach them with ssh, the remote-terminal tool that gets its own module — 15.)
Municipal water infrastructure is everywhere, critical, and invisible — nobody thinks about pumping stations until a pipe bursts. Linux servers are the pumping stations of the internet.
Where the analogy stops working. You will never be asked to fix a pumping station. From your first on-call shift, the invisible infrastructure is your job — which is exactly why this track keeps asking "now imagine this at 500 hosts".
🧪 Exercise D3.1 — Your machine's identity card
# Everything below was taught in this module. Read each line, predict its output,
# THEN run it. This is the habit that matters from here on.
whoami
hostname # prints this machine's network name
uname -sr
uname -m
cat /etc/os-release✅ Expected result — click to reveal
zaeem
myhost
Linux 6.8.0-79-generic
x86_64
PRETTY_NAME="Ubuntu 24.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
...What to read out of it:
- Five commands answer the five identity questions you will ask of every unfamiliar machine for the rest of your career: who am I on it, what is it called, what kernel, what architecture, what distribution. Fifteen seconds, complete picture.
- hostname is new but true to its name — machines have names so that humans and networks can refer to them; Module 13 shows how names resolve to addresses. myhost is illustrative too: yours prints whatever the machine was named, and cloud VMs often show something like ip-172-31-8-14.
- If every line's output matched your prediction, Module 1 has done its job.
Part D — Interview questions
🎯 "What is the difference between Linux and Unix?" — asked verbatim in GeeksforGeeks' Linux Interview Questions (70+ questions, updated July 2026); InterviewBit's set (2025) words it "Write difference between Linux and Unix."
Unix is the original 1969 Bell Labs operating system and its licensed commercial descendants (AIX, Solaris, HP-UX); the name is a trademark tied to certification. Linux is a Unix-like kernel written independently by Linus Torvalds in 1991 — it shares Unix's design philosophy and follows POSIX, but contains none of Unix's code and is free software under GPLv2. Unix development is vendor-controlled; Linux is developed publicly by thousands of contributors and packaged by distributions. Today Linux utterly dominates servers and cloud; certified Unix survives mostly in legacy enterprise systems — and in macOS.
The details that separate candidates: "shares the design, not the code" — that one sentence shows real understanding; naming POSIX as the compatibility glue; and knowing macOS is a certified Unix, which surprises interviewers pleasantly and explains why Mac terminals feel Linux-ish.
🎯 "What is the core of the Linux Operating System?" — asked verbatim in Tecmint's 15 Basic Linux Interview Questions (updated May 2025)
The kernel. It is the lowest software layer, the bridge between hardware and everything else: it schedules the CPU, manages memory, drives devices, and serves system calls from userspace. Remove the kernel and nothing else can run; replace the parts around it and you simply have a different distribution.
The details that separate candidates: not stopping at the one-word answer — briefly walking the layer model (hardware → kernel → libraries and utilities → shell → user) shows you hold the whole map, not a flashcard.
🎯 "What did Linus Torvalds create?" — asked verbatim in Tecmint's 15 Basic Linux Interview Questions (updated May 2025)
Precisely: the Linux kernel — not the whole operating system, and not the tools around it. In 1991, as a Helsinki student, he released it under the GPL; combined with the GNU project's existing tools it became the complete free OS the world now runs on. (He later created git, which is a fine bonus point.) The kernel is written in C, with recent additions of Rust in drivers.
The details that separate candidates: the discipline of saying "the kernel, not the OS" — this question exists to catch exactly that imprecision — and the git remark, which reliably lands well in DevOps interviews since the same person built two tools you use daily.
Part E — Toolkit
E1. Production practice — symptoms and fixes
| Symptom | What is really happening | What to run | The fix |
|---|---|---|---|
| command not found right after pasting from a runbook | Typo, the tool isn't installed, or the runbook was written for a different distro family | type thecommand · cat /etc/os-release | Fix the spelling; if the distro differs from the runbook's, find the family's equivalent (installing tools is Module 9) |
| A command "did nothing" — no output at all | It almost certainly succeeded; silence is the success signal | Nothing yet — resist re-running it blind | Learn to confirm outcomes: Module 5 teaches exit codes, the formal success/failure signal |
| man: command not found, or man prints a "This system has been minimized" notice | Minimal server/container image shipped without documentation | thecommand --help | Use --help on the host; read full man pages on your workstation or at man7.org |
| No manual entry for foo in section 5 | The page exists in a different section, or its package isn't installed | whatis foo · apropos foo | Open the right section, e.g. man 1 foo; whatis output tells you which exist |
| Doc says run Setup-Tool, shell says not found — but a colleague swears it works | Case mismatch or a different shell/OS on the colleague's side — Linux names are case-sensitive | type Setup-Tool · type setup-tool · apropos setup | Find the real name with apropos/type and correct the doc for the next person |
E2. Capstone — four tickets
🎫 Ticket 1 — "Compliance needs the platform details of vm-billing-3"
Ticket text: "For the audit sheet we need: OS distribution + exact version, kernel version, CPU architecture, and the hostname as the system reports it. Screenshot or paste output."
Worked answer — four commands, run on the box:
hostname
cat /etc/os-release # record PRETTY_NAME and VERSION_ID
uname -r # kernel release
uname -m # architecturePaste the output and record: hostname as line 1; distribution from PRETTY_NAME (e.g. Ubuntu 24.04.4 LTS); kernel from uname -r; architecture x86_64 or aarch64. Two habits make this professional: use VERSION_ID/ID rather than retyping the pretty name (audit tools compare the machine-readable fields), and paste command output verbatim instead of paraphrasing — auditors, like debuggers, want evidence, not summaries.
🎫 Ticket 2 — "New joiner: 'HELP is not recognized, is my server broken?'"
Ticket text: "I typed HELP like on Windows and got HELP: command not found. Then help printed something confusing. How do I find out how to use commands here?"
Worked answer — three things to explain, gently:
- Linux is case-sensitive: HELP and help are different names, which is why the capitals version failed outright.
- There is no single help command; help is per command. The working method: somecommand --help for a quick summary; man somecommand for the full manual (q exits the reader — say this or they will be stuck); apropos keyword when they don't know a command's name yet.
- Their lowercase help did run — it is a bash builtin describing the shell's own commands, which is genuinely confusing on day one and safe to ignore until Module 10.
A strong reply also includes one worked example (date --help, then man date) rather than instructions in the abstract.
🎫 Ticket 3 — "Engineer followed man passwd and edited the wrong thing"
Ticket text: "Our runbook says 'see man 5 passwd for the file layout'. An engineer ran man passwd, read about the password-changing command, and got confused about what the runbook wanted. What went wrong, and how do we stop it recurring?"
Worked answer: the manual has numbered sections, and passwd exists in two of them — section 1 (the passwd command) and section 5 (the format of the accounts file, /etc/passwd). Plain man passwd returns the first match in man's section search order (section 1 comes first on Ubuntu), so the engineer read the command's page — authoritative-looking, and irrelevant. man 5 passwd was the page the runbook meant. Verify with whatis passwd, which lists both. Prevention: runbooks should always write man references with the section — passwd(5), crontab(5) vs crontab(1) — and reviewers should treat a bare man foo in a runbook as a bug. The title bar of every man page shows its section; glancing at it is free insurance.
🎫 Ticket 4 — "Runbook commands fail on the new Rocky hosts"
Ticket text: "We added Rocky Linux hosts to a fleet that was all Ubuntu. The provisioning runbook fails early on them. Before touching anything: how do we tell, per host, exactly what we're on, and why would Ubuntu instructions fail on Rocky?"
Worked answer: identify each host with cat /etc/os-release — on the new machines ID=rocky with ID_LIKE="rhel centos fedora", versus ID=ubuntu, ID_LIKE=debian on the old ones. That ID_LIKE field is the explanation in miniature: Rocky belongs to the Red Hat family, Ubuntu to the Debian family, and family-specific tooling — starting with the software-installation commands most runbooks are full of — differs between them (Module 9 covers both families' tools). The everyday commands of this module behave the same on both. Professional fix: make the runbook check ID/ID_LIKE and branch, or state its supported distro on line 1 — and never infer a host's OS from its name or its age.
E3. Documentation reference
| Topic | Authoritative source | Verified link |
|---|---|---|
| The kernel's own documentation | kernel.org | docs.kernel.org |
| The manual system itself | man(1), man-pages(7) | man(1) · man-pages(7) |
| Commands used in this module | coreutils man pages | uname(1) · date(1) · echo(1) · whoami(1) · hostname(1) · apropos(1) |
| Distro identification file | os-release(5) | os-release(5) |
| The shell | GNU Bash manual | Bash Reference Manual |
| Standard tools, in depth | GNU coreutils manual | coreutils manual |
| Unix standards | standards(7) | standards(7) |
| Practice environments | Microsoft / Ubuntu | Install WSL · Ubuntu CLI tutorial |
| The theory beneath this module | Companion track | Untitled |
E4. Self-assessment
Answer out loud, without notes. If any answer is shaky, the section number tells you where to re-read.
- What are the three jobs of an operating system, and which single program does the hardware-facing part? (A1–A2)
- A program wants to read a file from disk. Walk the request through the layers, naming the boundary it crosses. (A2)
- Strictly speaking, what is "Linux" — and what is Ubuntu, then? (A2–A3)
- On an unfamiliar machine, which one file tells you the distribution and version, and which two fields in it should scripts read? (A3)
- What is the difference between the terminal and the shell? What does a # at the end of a prompt tell you? (A4)
- In date -u "+%H:%M", identify the command, the option, and the argument — and explain what the shell does to the line before date ever runs. (B1)
- Why does a successful command often print nothing, and why does that matter operationally? (B1)
- bash: daet: command not found versus date: invalid option -- 'x' — who is the reporter in each, and why does that change your next move? (B3)
- man passwd and man 5 passwd open different documents. Explain the mechanism, and the runbook convention that prevents the mixup. (C3)
- You need a command whose name you don't know, on a server with no man pages installed. What is your method? (C1, C4)
- Linux versus Unix in two sentences — code, license, and what glues the family together. (D1–D2)
- Why must a deployment pipeline care about uname -m? (D2)
E5. Sources
GeeksforGeeks — Linux Interview Questions (70+) (updated July 2026) · InterviewBit — Linux Interview Questions (2025) · Tecmint — 15 Basic Linux Interview Questions (updated May 2025) · Adaface — 96 Linux Commands interview questions (September 2024) · Coursera — 15 Linux Interview Questions (updated March 2026, consulted for coverage).
Corpus honesty note: fundamentals questions (kernel, Linux vs Unix, shells) are abundant in recent published sets. Questions about the help system (man, apropos, sections) are scarce — only Adaface's 2024 set asks them directly; the coverage here goes deeper than the published corpus because interviewers probe it live instead.
All documentation links on this page were fetched and confirmed reachable on 2 September 2026.