Module brief#
Before memorising flags, build a clear mental model: what an operating system does, where the Linux kernel sits, how the filesystem tree is organised, and how the shell fits between you and the kernel.
Learning objectives#
- Explain multiuser and multitasking ideas in plain language
- Name the roles of the kernel, filesystem, processes, and shell
- List common top-level directories under
/(FHS-style layout) - Recognise basic file type markers (
-,d,l, and others) - Identify your shell with
$SHELLand distinguish a distribution from the kernel
1. A short lineage (original overview)#
UNIX grew in research labs as a multiuser, multitasking system with a small kernel and many small tools that combine well. Linux began as a free kernel project that, together with GNU and other userland programs, forms complete operating systems we install today.
You do not need exam-style dates for this course. Remember the idea: one kernel, many distributions, and a culture of small programs that pipe together.
A distribution (distro) packages a kernel, system libraries, a default shell, an installer, and a package manager. Examples you will hear often:
- Debian / Ubuntu family — often managed with
apt - Fedora / RHEL family — often managed with
dnf(Oracle Linux is one RHEL-compatible option some workplaces use)
Same ideas; different packaging defaults.
2. Multiuser and multitasking#
Multiuser means several accounts can exist on one machine. Each has a home directory and permissions. You usually work as an ordinary user (student, labuser, or your name), and escalate to an administrator only when needed.
Multitasking means many programs can run at once. The kernel schedules CPU time and keeps processes from trampling each other’s memory.
On a laptop you are often the only human user, yet system services (networking, logging, desktop components) still run as separate processes in the background. Those long-running helpers are often called daemons.
3. The OS stack you will keep drawing#
A simple mental picture:
┌─────────────────────────────┐
│ You (terminal / apps) │
├─────────────────────────────┤
│ Shell (bash, zsh, …) │ ← interprets your typed commands
├─────────────────────────────┤
│ User programs & libraries │
├─────────────────────────────┤
│ Kernel │ ← CPU, memory, devices, filesystems
├─────────────────────────────┤
│ Hardware │
└─────────────────────────────┘
- Kernel — talks to hardware; creates processes; manages memory and device drivers; enforces permissions at a low level.
- Filesystem — the tree of files and directories starting at
/(root). - Processes — running instances of programs, each with a process ID (PID).
- Shell — the program that reads your command line and starts other programs for you.
Confirm the kernel name and release:
uname
uname -r
uname -a
Example from a practice host:
Linux
6.12.94+
Linux grok-bot-vm-270875175 6.12.94+ #1 SMP PREEMPT_DYNAMIC Wed Sep 23 20:54:12 UTC 2026 x86_64 GNU/Linux
Confirm your shell:
echo $SHELL
/bin/bash
Popular shells include bash (very common default), sh (POSIX-oriented), and zsh (feature-rich, popular with many developers). This course uses bash-style examples.
4. The filesystem tree (FHS-style)#
Everything hangs under /. On a practice host, ls / may look like:
ls /
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
(Your list may include extra entries; names above are the ones to learn first.)
| Path | Typical role |
|---|---|
/bin, /sbin, /usr/bin |
Essential and everyday commands |
/etc |
System configuration files |
/home |
Ordinary users’ home directories |
/root |
Home for the root account (not /) |
/tmp |
Temporary files (often cleared on reboot) |
/var |
Variable data: logs, caches, spools |
/proc, /sys |
Kernel/runtime information exposed as files |
/dev |
Device files (disks, terminals, …) |
/opt |
Optional add-on software |
/boot |
Bootloader and kernel images |
Root directory / is not the same as the root user. The root user is an account; / is the top of the tree.
5. File types at a glance#
ls -l starts each line with a type character:
| Char | Meaning |
|---|---|
- |
Regular file |
d |
Directory |
l |
Symbolic link |
c |
Character device |
b |
Block device |
p |
Named pipe (FIFO) |
s |
Socket |
Example listings from a lab folder:
ls -l /tmp/linux-lab-pushpjeet/notes.txt /tmp/linux-lab-pushpjeet/project /tmp/linux-lab-pushpjeet/soft-notes
-rw-r--r-- 2 box box 49 Sep 26 11:04 notes.txt
drwxr-xr-x 5 box box 4096 Sep 26 11:04 project
lrwxrwxrwx 1 box box 9 Sep 26 11:04 soft-notes -> notes.txt
The first character is -, d, or l above. Device types show up under /dev; you will meet them briefly when exploring.
The file command guesses content type:
file notes.txt /bin/ls /dev/null soft-notes project
notes.txt: ASCII text
/bin/ls: ELF 64-bit LSB pie executable, x86-64, ...
/dev/null: character special (1/3)
soft-notes: symbolic link to notes.txt
project: directory
6. Processes and the shell as your interface#
When you type ls and press Enter, the shell finds the ls program, starts it as a new process, waits for it to finish, then shows you another prompt. Background services keep running whether or not you are logged in.
You already use the shell every time you see a prompt. Later modules teach options, arguments, man pages, and scripting. For now, remember: the shell is not the kernel — it is a user program that starts other programs.
Practice: MCQs#
Q1. What does the Linux kernel mainly do?
- A) Draw windows and icons for the desktop
- B) Manage hardware, processes, and memory for the system
- C) Store only your personal documents
- D) Replace the need for a shell
Answer
B. The kernel is the core of the OS. Desktops and shells are user-space programs that rely on it.
Q2. Which statement about distributions is accurate?
- A) Every distro invents a completely different kernel from scratch each year
- B) A distro packages a kernel plus userland tools, defaults, and a package manager
- C) Ubuntu and Fedora cannot run the same basic commands like
ls - D) Oracle Linux is required for all Linux learning
Answer
B. Distros share Linux concepts; packaging and defaults differ. Oracle Linux may appear at work as one RHEL-compatible choice, not a course mandate.
Q3. The path / refers to:
- A) The root user’s home directory
- B) The top of the filesystem tree
- C) Only temporary files
- D) The currently running shell binary
Answer
B. The root user’s home is typically /root. The directory / is the tree’s apex.
Q4. In ls -l, a line starting with d means:
- A) A deleted file
- B) A device driver
- C) A directory
- D) A compressed archive
Answer
C. d = directory, - = regular file, l = symbolic link.
Q5. echo $SHELL prints /bin/bash. This means:
- A) Bash is the kernel
- B) Your login shell program is bash
- C) You are logged in as root
- D) The filesystem is full
Answer
B. $SHELL holds the path of your shell. Bash is a user program.
Q6. /etc is commonly used for:
- A) User downloads only
- B) System configuration files
- C) Kernel source code exclusively
- D) Swap space
Answer
B. Administrators spend a lot of time reading files under /etc.
Practice: Flashcards#
| Front | Back |
|---|---|
| Kernel | Core OS software that manages CPU, memory, devices, and processes |
| Shell | Program that reads your commands and starts other programs (e.g. bash) |
| Distribution (distro) | Packaged OS: kernel + tools + installer + package manager |
/ |
Root of the filesystem tree |
/home |
Ordinary users’ personal directories |
/etc |
System-wide configuration |
| Multiuser | Multiple accounts can exist and work on one machine |
| Daemon | Long-running background service process |
uname -r |
Print kernel release string |
File type l |
Symbolic link |
Practice: Match the columns#
Match each item on the left with its role on the right.
| Item | Role (scrambled) |
|---|---|
| 1. Kernel | A. Interprets typed commands |
| 2. Shell | B. Variable data such as logs |
3. /tmp |
C. Manages hardware and processes |
4. /var |
D. Temporary files |
5. /proc |
E. Runtime/kernel information as files |
| 6. Process | F. A running instance of a program |
Answer key
1 → C, 2 → A, 3 → D, 4 → B, 5 → E, 6 → F
Practice: Mini terminal challenge#
Challenge: Classify /#
Goal: Connect names under / to roles.
Setup: Any Linux shell.
Tasks:
- Run
ls /and copy the names into your notes. - Mark at least six names with a one-word purpose (
config,homes,temp,logs, …). - Run
echo $SHELLanduname -s. - Run
ls -ld /etc /home /tmpand note the leadingdon each line.
Verify: You can explain /etc, /home, and /tmp without looking them up.
Stretch: Run ls -l /bin/ls and identify whether /bin/ls is a regular file or a symlink on your system (some distros link /bin into /usr/bin).
Hands-on lab#
Goal: Build the OS mental model with live commands.
Steps:
- In your lab directory, create
os-notes.txtand write three lines: kernel role, shell role, why/≠ root user. - Run
ls /and classify ten entries in that file. - Run
file /bin/lsandfile /etc/hostname(or another text config) and paste the summaries into your notes. - Draw the four-layer stack (you → shell → kernel → hardware) on paper or in a markdown file.
Verify: cat os-notes.txt shows your classifications; echo $SHELL matches what you wrote about your shell.
Stretch: Compare Ubuntu vs a RHEL-family system (even via documentation): which package manager does each family typically use?
Common mistakes#
- Confusing the root user with the root directory
- Thinking “Linux” only means one company’s product
- Ignoring
/procand/sys— they look like files but expose kernel state - Assuming every distro places binaries only under
/bin(many use/usr/binwith compatibility links)
Summary#
Linux systems share a kernel, a filesystem tree rooted at /, processes, and a shell that starts programs for you. Distributions package those pieces differently. You can now read uname, $SHELL, and a basic ls -l type character with confidence.