The Linux System Stack

You already know how to talk to Linux through the shell (from the Foundations modules). This module is about what's underneath that conversation - the layers of software and hardware that make it possible for you to type ls and see a list of files half a second later.

Analogy: Think of a Linux computer like a company. Hardware is the building and equipment. Firmware is the security guard who unlocks the doors each morning. The bootloader is the receptionist who points arriving staff to the right floor. The kernel is upper management - it doesn't talk to customers directly, but it controls who gets which resources (memory, CPU time, disk access) and enforces the rules. Userspace - your shell, your text editor, your web server - is everyone else in the building actually doing visible work.

Here is the stack from the ground up, in the order things become "alive" as a machine boots:

LayerRoleExamples
HardwarePhysical CPU, RAM, disks, NICs-
FirmwareInitialises hardware, finds a bootloaderBIOS, UEFI
BootloaderLoads the kernelGRUB2, systemd-boot
KernelManages memory, processes, drivers, syscallsvmlinuz
init systemFirst userspace process (PID 1), starts servicessystemd, SysVinit
UserspaceShells, daemons, applicationsbash, nginx

The kernel is the one piece of this stack that never talks to you directly. When you run ls, bash (a userspace program) doesn't read the disk itself - it asks the kernel to do it, through a controlled doorway called a system call (or syscall). The kernel checks whether you're allowed to do what you're asking, then does the actual disk I/O and hands the result back. This indirection is exactly what lets Linux enforce permissions, isolate processes from each other, and stay stable even when a program misbehaves - a crashing userspace program can't normally take the kernel down with it.

Tip: Strictly speaking, "Linux" is the kernel - not the whole operating system. The OS is the kernel plus the userland (GNU tools like bash, ls, grep, plus an init system and libraries). This is why some people insist on calling it "GNU/Linux" - the name captures that it's a partnership between the kernel and the surrounding toolset, which is why Ubuntu, Fedora, and Arch can all run "the same Linux" while looking and feeling different.