"Linux" is not one thing. It's a stack — layers of software, each with a specific job, each independently replaceable. Understanding the stack is understanding why Linux works the way it does, and why you have choices that don't exist elsewhere.
The Stack
Every time you click an icon on a Linux desktop, software from all five layers is involved. Most operating systems hide this. Linux exposes it — and lets you swap out any layer you don't like.
The physical machine. CPU, RAM, GPU, disk, network interfaces. Linux speaks to hardware through drivers — small programs that translate the kernel's generic instructions into hardware-specific signals. Most drivers ship with the kernel itself.
lscpu # CPU info
free -h # RAM (watch "available", not "free")
lspci # PCI devices: GPU, NIC, etc.
lsblk # Block storage devices
This is what "Linux" actually refers to. The kernel is the core program that manages hardware access, memory, processes, and the filesystem. Every other piece of software sits on top of it. Linus Torvalds wrote the first version in 1991 and still leads development today.
$ free -h
total used free shared buff/cache available
Mem: 15Gi 6.2Gi 400Mi 1.1Gi 8.4Gi 8.0Gi
RAM will look 90% full on a healthy Linux system. That is normal.
The kernel aggressively fills available RAM with disk and file cache —
pages it has read before that it keeps in memory in case you need
them again. This makes your system faster. Watch available,
not free. Available = what could be freed if a program
needed it. Free = what is sitting literally empty right now.
The display server is the intermediary between your GPU and everything that draws pixels on screen. It handles input events (keyboard, mouse), manages windows as surfaces, and coordinates who gets to draw what and when. X11 (Xorg) has been around since 1984. It is actively maintained, cared for, and fed — do not believe obituaries. Wayland is a newer protocol with better security and GPU integration, but has coverage gaps in gaming, screen capture, and remote desktop that X11 doesn't.
echo $XDG_SESSION_TYPE
# prints: x11 or wayland
loginctl show-session $XDG_SESSION_ID -p Type
The window manager decides where windows live on screen, how you move and resize them, and what the window borders (if any) look like. It's a separate program from the display server — a subtlety that matters. Tiling managers (i3, Sway) automatically arrange windows in a grid with no overlapping. Floating managers (Openbox, Fluxbox) let you drag windows freely, like Windows or macOS. Desktop environments ship their own window manager (GNOME uses Mutter; KDE uses KWin) but you can swap them out.
wmctrl -m
# or
echo $GDMSESSION
Everything you actually use lives here: browsers, editors, games, terminals. The shell (bash, zsh, fish) is the command interpreter — what runs when you open a terminal. It is itself just an application sitting at layer 1, but it's the one that talks to every other layer. Most Linux configuration happens through the shell, which is why learning it matters.
echo $SHELL
# common answers: /bin/bash /bin/zsh /usr/bin/fish
cat /etc/shells
# all available shells on your system
Key Terms
These words get thrown around constantly in Linux discussions. Know what they actually mean and you'll stop feeling lost in documentation and forums.