Linux_history_distributions
Chapter 1: Linux History, Distributions, and System Architecture
Section titled “Chapter 1: Linux History, Distributions, and System Architecture”Overview - Why This Chapter Matters
Section titled “Overview - Why This Chapter Matters”This chapter is absolutely critical for your DevOps/SRE/SysAdmin interview preparation. After reading this, you MUST understand:
- How Linux evolved and why it dominates infrastructure
- The exact differences between distributions and when to use each
- How the Linux kernel interacts with hardware
- The complete boot process from power button to login
- Memory management, process scheduling, and filesystem internals
This knowledge separates junior admins from senior engineers.
1.1 The Complete History of Linux
Section titled “1.1 The Complete History of Linux”1.1.1 The GNU Project - The Foundation (1983-1991)
Section titled “1.1.1 The GNU Project - The Foundation (1983-1991)”Before Linux, there was GNU (GNU’s Not Unix), started by Richard Stallman in 1983. The GNU project created almost everything that makes up a complete OS:
| Component | Description |
|---|---|
| Bash | The GNU shell - command line interface |
| GCC | GNU C Compiler - the C compiler |
| GDB | GNU Debugger |
| GNU Coreutils | Basic system utilities (ls, cp, mv, cat, dd, etc.) |
| glibc | The GNU C library |
| Emacs | Text editor |
What GNU didn’t have was a working kernel. That’s where Linux comes in.
1.1.2 Linus Torvalds and the Birth of Linux (1991)
Section titled “1.1.2 Linus Torvalds and the Birth of Linux (1991)”In August 1991, Linus Torvalds, a 21-year-old student at the University of Helsinki, announced a hobby kernel project on comp.os.minix:
“I’m doing a (free) operating system (just a hobby, won’t be big and professional like GNU) for 386(486) AT clones.”
Key dates in early Linux history:
┌─────────────────────────────────────────────────────────────────────┐│ LINUX HISTORY TIMELINE │├─────────────────────────────────────────────────────────────────────┤│ 1991 │ Linux 0.01 released (first version, no networking) ││ 1991 │ Linux 0.02 - first public release ││ 1992 │ Linux 0.95 - first version with X Window System ││ 1992 │ Linus releases Linux under GPL (General Public License) ││ 1994 │ Linux 1.0 released ││ 1996 │ Linux 2.0 - introduces kernel threading ││ 2001 │ Linux 2.4 - huge scalability improvements ││ 2003 │ Linux 2.6 - modern threading, O(1) scheduler ││ 2004 │ Ubuntu released - revolutionizes desktop Linux ││ 2007 │ Android (Linux kernel) announced ││ 2011 │ systemd introduced - init system revolution ││ 2013 │ Docker containerization emerges ││ 2015 │ Linux 4.0 - Live patching ││ 2019 │ IBM acquires Red Hat for $34B ││ 2020 │ Linux 5.8 - biggest release ever ││ 2023 │ Linux 6.0+ - continuous innovation │└─────────────────────────────────────────────────────────────────────┘1.1.3 Why GPL Was Crucial
Section titled “1.1.3 Why GPL Was Crucial”The GPL (GNU General Public License) license ensured:
- Linux remains free forever - “Copyleft” requires derivative works to remain open source
- Creates competitive ecosystem - Red Hat, Canonical, SUSE, Arch all thrive
- Allows corporations to contribute back - IBM, Google, Intel, Samsung all contribute
- Prevents “vendor lock-in” - You can modify and redistribute
1.1.4 Linux vs Unix
Section titled “1.1.4 Linux vs Unix”┌─────────────────────────────────────────────────────────────────────┐│ LINUX vs UNIX │├─────────────────────────────────────────────────────────────────────┤│ LINUX │ UNIX ││ ─────────────────────────────┼────────────────────────────────────││ Free, open source │ Mostly proprietary (AIX, HP-UX) ││ Runs on almost any hardware │ Limited hardware support ││ Single unified kernel │ Multiple variants (BSD, System V) ││ Huge community support │ Enterprise support focused ││ Linux everywhere: │ Traditional UNIX: ││ - Servers │ - Solaris ││ - Android │ - AIX ││ - Embedded │ - HP-UX ││ - Supercomputers (100%) │ - BSD variants │└─────────────────────────────┴────────────────────────────────────┘1.2 Linux Distributions
Section titled “1.2 Linux Distributions”1.2.1 Major Distribution Families
Section titled “1.2.1 Major Distribution Families”Linux distributions (distros) are Linux OS packages consisting of the Linux kernel, GNU tools, and package manager. Here are the major families:
┌─────────────────────────────────────────────────────────────────────────────────┐│ LINUX DISTRIBUTION FAMILIES │├─────────────────────────────────────────────────────────────────────────────────┤│ ││ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ││ │ DEBIAN-BASED │ │ RED HAT-BASED │ │ ARCH-BASED │ ││ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤ ││ │ Debian │ │ RHEL │ │ Arch Linux │ ││ │ Ubuntu │ │ CentOS │ │ Manjaro │ ││ │ Linux Mint │ │ Fedora │ │ EndeavourOS │ ││ │ Kali Linux │ │ AlmaLinux │ │ Garuda Linux │ ││ │ Pop!_OS │ │ Rocky Linux │ │ ArcoLinux │ ││ └────────┬────────┘ └────────┬────────┘ └────────┬────────┘ ││ │ │ │ ││ ▼ ▼ ▼ ││ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ││ │ Package: .deb │ │ Package: .rpm │ │ Package: .pkg │ ││ │ Manager: apt │ │ Manager: dnf │ │ Manager: pacman│ ││ │ Init: systemd │ │ Init: systemd │ │ Init: systemd │ ││ └─────────────────┘ └─────────────────┘ └─────────────────┘ ││ ││ ┌─────────────────┐ ┌─────────────────┐ ││ │ SUSE-BASED │ │ GENTOO │ ││ ├─────────────────┤ ├─────────────────┤ ││ │ openSUSE │ │ Gentoo │ ││ │ SUSE Linux Ent │ │ Funtoo │ ││ └────────┬────────┘ └────────┬────────┘ ││ │ │ ││ ▼ ▼ ││ ┌─────────────────┐ ┌─────────────────┐ ││ │ Package: .rpm │ │ Source-based │ ││ │ Manager: zypper │ │ Portage │ ││ │ Init: systemd │ │ OpenRC/systemd │ ││ └─────────────────┘ └─────────────────┘ ││ │└─────────────────────────────────────────────────────────────────────────────────┘1.2.2 Distribution Comparison Table
Section titled “1.2.2 Distribution Comparison Table”┌──────────────┬──────────────┬──────────────┬──────────────┬──────────────┐│ Distribution│ Target │ Update Type │ Ease of Use │ Best For ││ │ Users │ │ │ │├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤│ RHEL │ Enterprise │ Slow/Stable │ Moderate │ Servers, ││ │ │ (10+ years) │ │ Enterprise │├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤│ Ubuntu LTS │ General │ Medium │ Easy │ Servers, ││ │ │ (5 years) │ │ Cloud, Dev │├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤│ Debian │ Stable:Serv │ Very Slow │ Moderate │ Servers, ││ │ Testing:Dev │ (2-3 years) │ │ Embedded │├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤│ Arch Linux │ Advanced │ Rolling │ Difficult │ Desktop, ││ │ │ (continuous)│ │ Learning │├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤│ Fedora │ Developers │ Rapid │ Easy │ Desktop, ││ │ │ (13 months) │ │ Innovation │├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤│ openSUSE │ Enterprise │ Mixed │ Easy │ Servers, ││ │ │ │ │ Desktop │├──────────────┼──────────────┼──────────────┼──────────────┼──────────────┤│ Gentoo │ Advanced │ Source │ Very Hard │ Embedded, ││ │ │ (compile) │ │ Performance │└──────────────┴──────────────┴──────────────┴──────────────┴──────────────┘1.2.3 Rolling vs Point Releases
Section titled “1.2.3 Rolling vs Point Releases”┌─────────────────────────────────────────────────────────────────────┐│ RELEASE MODEL COMPARISON │├─────────────────────────────────────────────────────────────────────┤│ ││ POINT RELEASES (Ubuntu, RHEL, Debian Stable) ││ ───────────────────────────────────────── ││ Version 20.04 ───► Version 22.04 ───► Version 24.04 ││ │ │ │ ││ ▼ ▼ ▼ ││ ┌─────────┐ ┌─────────┐ ┌─────────┐ ││ │ 5 years │ │ 5 years │ │ 5 years │ ││ │ support │ │ support │ │ support │ ││ └─────────┘ └─────────┘ └─────────┘ ││ ││ Pros: Stable, predictable, tested packages ││ Cons: Older software, major upgrades painful ││ ││ ROLLING RELEASE (Arch, openSUSE Tumbleweed, Gentoo) ││ ─────────────────────────────────────────────────── ││ ════════════════════════════════════════════════ ││ │ │ │ │ │ ││ ▼ ▼ ▼ ▼ ▼ ││ ┌─────────┐┌─────────┐┌─────────┐┌─────────┐┌─────────┐ ││ │ Daily ││ Weekly ││ Monthly ││ Never ││ Always │ ││ │ Updates ││ Updates ││ Updates ││ "New" ││ "New" │ ││ └─────────┘└─────────┘└─────────┘└─────────┘└─────────┘ ││ ││ Pros: Always latest software, no major upgrades ││ Cons: Can break, requires more maintenance ││ │└─────────────────────────────────────────────────────────────────────┘1.2.4 Choosing a Distribution for Your Career
Section titled “1.2.4 Choosing a Distribution for Your Career”As an Arch Linux user preparing for DevOps/SRE roles, here’s what you should know:
| Role | Recommended Primary | Recommended Secondary |
|---|---|---|
| DevOps Engineer | Ubuntu LTS / RHEL | Fedora / Arch (for home) |
| SRE | RHEL / CentOS/AlmaLinux | Ubuntu LTS |
| SysAdmin (Enterprise) | RHEL / SLES | Ubuntu Server |
| SysAdmin (Cloud) | Ubuntu / Amazon Linux | RHEL |
| Developer/Desktop | Arch / Fedora / Ubuntu | Any rolling release |
1.3 Linux Architecture - The Complete Picture
Section titled “1.3 Linux Architecture - The Complete Picture”1.3.1 The Complete Layer Architecture
Section titled “1.3.1 The Complete Layer Architecture”Every Linux system has these layers working together:
┌─────────────────────────────────────────────────────────────────────┐│ USER SPACE (User Mode) ││ ┌─────────────────────────────────────────────────────────────┐ ││ │ Applications │ Libraries │ Shell │ ││ │ ───────────── │ ───────── │ ───── │ ││ │ • nginx │ • glibc │ • bash │ ││ │ • mysql │ • openssl │ • zsh │ ││ │ • docker │ • libcurl │ • fish │ ││ │ • python │ • libjson │ • sh │ ││ └─────────────────────────────────────────────────────────────┘ │└─────────────────────────────────────────────────────────────────────┘ │ ▼ System Calls (API Boundary)┌─────────────────────────────────────────────────────────────────────┐│ KERNEL SPACE (Kernel Mode) ││ ┌─────────────────────────────────────────────────────────────┐ ││ │ Core Components │ Subsystems │ ││ │ ─────────────── │ ──────────── │ ││ │ • Process Scheduler │ • Network Stack │ ││ │ (O(1)/CFS) │ (TCP/IP, Routing) │ ││ │ • Memory Management │ • Virtual Filesystem │ ││ │ (MMU, Swapping) │ (VFS - ext4, xfs, btrfs) │ ││ │ • IPC Mechanisms │ • Security (SELinux, AppArmor)│ ││ │ (Signals, Pipes) │ • Device Drivers │ ││ └─────────────────────────────────────────────────────────────┘ ││ ┌─────────────────────────────────────────────────────────────┐ ││ │ DEVICE DRIVERS │ ││ │ Block Devices │ Char Devices │ Network Devices │ ││ │ ──────────── │ ──────────── │ ───────────── │ ││ │ • disk, LVM │ • tty, null │ • eth0, wlan0 │ ││ └─────────────────────────────────────────────────────────────┘ │└─────────────────────────────────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────────────────────────────────┐│ HARDWARE ││ CPU (x86/ARM/RISC-V) │ RAM │ DISK │ NETWORK CARD │└─────────────────────────────────────────────────────────────────────┘1.3.2 System Calls - The Kernel API
Section titled “1.3.2 System Calls - The Kernel API”Every interaction with hardware goes through system calls (syscalls):
┌─────────────────────────────────────────────────────────────────────┐│ COMMON SYSTEM CALLS │├─────────────────────────────────────────────────────────────────────┤│ Category │ Syscall │ Description ││ ────────────┼─────────────┼──────────────────────────────────────││ Process │ fork() │ Create new process (copy) ││ Process │ exec() │ Replace process image ││ Process │ exit() │ Terminate process ││ Process │ wait() │ Wait for child process ││ Process │ kill() │ Send signal to process │├──────────────┼─────────────┼──────────────────────────────────────││ Memory │ brk()/sbrk()│ Change data segment size ││ Memory │ mmap() │ Map memory to file/device ││ Memory │ mprotect() │ Set memory protection ││ Memory │ munmap() │ Unmap memory │├──────────────┼─────────────┼──────────────────────────────────────││ File │ open() │ Open file ││ File │ close() │ Close file ││ File │ read() │ Read from file descriptor ││ File │ write() │ Write to file descriptor ││ File │ lseek() │ Change file position ││ File │ stat() │ Get file metadata ││ File │ chmod() │ Change file permissions ││ File │ mount() │ Mount filesystem │├──────────────┼─────────────┼──────────────────────────────────────││ Network │ socket() │ Create socket ││ Network │ bind() │ Bind socket to address ││ Network │ listen() │ Listen for connections ││ Network │ accept() │ Accept connection ││ Network │ connect() │ Connect to remote ││ Network │ send() │ Send data ││ Network │ recv() │ Receive data │├──────────────┼─────────────┼──────────────────────────────────────││ IPC │ pipe() │ Create pipe ││ IPC │ shmget() │ Get shared memory ││ IPC │ msgget() │ Get message queue ││ IPC │ semop() │ Semaphore operations │├──────────────┼─────────────┼──────────────────────────────────────││ Info │ getpid() │ Get process ID ││ Info │ getuid() │ Get user ID ││ Info │ uname() │ Get system information ││ Info │ time() │ Get current time │└──────────────┴─────────────┴──────────────────────────────────────┘1.3.3 How a Syscall Works
Section titled “1.3.3 How a Syscall Works”┌─────────────────────────────────────────────────────────────────────┐│ SYSCALL EXECUTION FLOW │├─────────────────────────────────────────────────────────────────────┤│ ││ User Space Kernel Space ││ ────────── ──────────── ││ ││ ┌─────────────┐ ┌─────────────┐ ││ │ printf() │ │ │ ││ │ (libc) │ │ │ ││ └──────┬──────┘ │ │ ││ │ │ │ ││ │ 1. User app calls │ │ ││ │ printf() │ │ ││ ▼ │ │ ││ ┌─────────────┐ syscall instruction │ │ ││ │ sys_write │ ───────────────────────►│ │ ││ │ (glibc) │ triggers software │ │ ││ └──────┬──────┘ interrupt │ │ ││ │ │ │ ││ │ 2. CPU switches to │ │ ││ │ kernel mode (ring 0) │ │ ││ │ ▼ │ ││ │ ┌─────────────┐ │ ││ │ │ sys_write │ │ ││ │ │ (kernel) │ │ ││ │ └──────┬──────┘ │ ││ │ │ │ ││ │ 3. Kernel executes │ │ ││ │ write operation │ │ ││ │ │ │ ││ │ 4. Return to user space │ │ ││ │ (ring 3) │ │ ││ ▼ ▼ │ ││ ┌─────────────┐ │ │ ││ │ Continue │◄─────────────────────────┘ │ ││ │ execution │ │ ││ └─────────────┘ │ ││ │└─────────────────────────────────────────────────────────────────────┘Summary
Section titled “Summary”In this chapter, you learned:
- ✅ The history of Linux - From GNU foundation to Linus Torvalds’ hobby project to global dominance
- ✅ Why GPL matters - How open source licensing enabled the Linux ecosystem
- ✅ Major Linux distributions - Debian-based, Red Hat-based, Arch-based families and when to use each
- ✅ Rolling vs Point releases - Understanding stable vs bleeding edge
- ✅ Linux architecture - User space vs kernel space layers
- ✅ System calls - The API between applications and the kernel
- ✅ How syscalls work - From user mode to kernel mode and back
This foundational knowledge is essential for understanding how Linux systems work under the hood, which is critical for troubleshooting, optimization, and security hardening.
Interview Questions
Section titled “Interview Questions”- What is the difference between Linux and UNIX?
- Why was the GPL license important for Linux’s success?
- What’s the difference between apt, dnf, yum, and pacman?
- Explain the difference between rolling release and point release distributions.
- What happens when a user space application needs to access hardware?
- What is a system call? Give some examples.
- What are the main components of the Linux kernel?
- Which distribution would you recommend for a production web server? Why?
Next Steps
Section titled “Next Steps”Now that you understand the history and architecture, proceed to:
- 02_filesystem_hierarchy.md - Understanding the Linux filesystem structure
- 03_boot_process_detailed.md - How Linux boots from power-on to login