Skip to content

Latest commit

ย 

History

History
260 lines (203 loc) ยท 10.5 KB

File metadata and controls

260 lines (203 loc) ยท 10.5 KB

๐Ÿง Chapter 01: Introduction to Linux

Beginner Chapter 01


๐Ÿ“‘ Table of Contents


What is Linux?

Linux is a free, open-source operating system kernel created by Linus Torvalds in 1991. When people say "Linux," they usually mean a complete operating system (called a distribution or distro) that bundles the Linux kernel with system utilities, a package manager, and often a graphical desktop.

๐Ÿ  Analogy: Think of the Linux kernel as the engine of a car. A Linux distribution is the complete car โ€” engine + body + interior + wheels. Different manufacturers (Ubuntu, Fedora, Arch) build different cars, but they all share the same type of engine.

Key Characteristics

Feature Description
Free & Open Source Anyone can view, modify, and distribute the source code
Multi-user Multiple users can work on the same system simultaneously
Multi-tasking Runs multiple processes at the same time
Portable Runs on everything from smartwatches to supercomputers
Secure Strong permission model and active security community
Stable Servers often run for years without rebooting

A Brief History

1969 โ”€โ”€ Unix created at AT&T Bell Labs (Ken Thompson & Dennis Ritchie)
  โ”‚
1983 โ”€โ”€ Richard Stallman launches GNU Project ("GNU's Not Unix")
  โ”‚
1991 โ”€โ”€ Linus Torvalds releases the first Linux kernel (v0.01)
  โ”‚       "I'm doing a (free) operating system (just a hobby, won't be big
  โ”‚        and professional like gnu)" โ€” Linus Torvalds, comp.os.minix
  โ”‚
1992 โ”€โ”€ Linux relicensed under GNU GPL
  โ”‚
1993 โ”€โ”€ Slackware & Debian โ€” first major distros
  โ”‚
1998 โ”€โ”€ "Open Source" term coined; major enterprise adoption begins
  โ”‚
2004 โ”€โ”€ Ubuntu launches, making Linux accessible to everyone
  โ”‚
2008 โ”€โ”€ Android (built on Linux kernel) launches
  โ”‚
2011 โ”€โ”€ Linux kernel 3.0 released
  โ”‚
2020sโ”€ Linux dominates servers (96.3% of top 1M servers),
        cloud computing, IoT, supercomputers (100% of TOP500),
        Android phones (3+ billion devices), and more.

Linux vs Unix

Aspect Unix Linux
Origin 1969, AT&T Bell Labs 1991, Linus Torvalds
License Proprietary (mostly) GPL (free & open source)
Cost Often expensive Free
Examples Solaris, AIX, HP-UX, macOS Ubuntu, Fedora, Arch, Debian
Hardware Specific hardware Runs on almost anything
Development Closed, corporate Open, community-driven

๐Ÿ“ Note: Linux is Unix-like but not Unix. It was written from scratch to be compatible with Unix standards (POSIX) without using Unix source code.


The Linux Kernel

The kernel is the core of the operating system. It manages:

Responsibility What It Does
Process Management Creates, schedules, and terminates processes
Memory Management Allocates and frees RAM, handles virtual memory
Device Drivers Communicates with hardware (disk, USB, GPU, etc.)
File Systems Manages how data is stored and retrieved
Networking Handles TCP/IP stack, sockets, and routing
System Calls Provides the API between user programs and hardware

Kernel Space vs User Space

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              USER SPACE                     โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ Bash โ”‚  โ”‚Firefoxโ”‚  โ”‚ vim  โ”‚  โ”‚ MySQLโ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ”‚
โ”‚     โ”‚         โ”‚         โ”‚         โ”‚        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚           SYSTEM CALL INTERFACE             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              KERNEL SPACE                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”‚
โ”‚  โ”‚ Process โ”‚ โ”‚  Memory  โ”‚ โ”‚  Device    โ”‚  โ”‚
โ”‚  โ”‚ Mgmt    โ”‚ โ”‚  Mgmt    โ”‚ โ”‚  Drivers   โ”‚  โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚              HARDWARE                       โ”‚
โ”‚  CPU   RAM   Disk   Network   GPU   USB    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Linux Distributions

A distribution (distro) = Linux kernel + system tools + package manager + desktop environment.

Major Distro Families

                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”Œโ”€โ”€โ”€โ”€โ”ค  Debian   โ”œโ”€โ”€โ”€โ”€โ”
                   โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
              โ”‚ Ubuntu  โ”‚          โ”‚  Mint  โ”‚
              โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
              โ”‚ Pop!_OS โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”Œโ”€โ”€โ”€โ”€โ”ค Red Hat  โ”œโ”€โ”€โ”€โ”€โ”
                   โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”          โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
              โ”‚ Fedora  โ”‚          โ”‚ CentOS โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜          โ”‚ Stream โ”‚
                                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

                        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                        โ”‚  Arch    โ”‚
                        โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
                        โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”
                        โ”‚ Manjaro โ”‚
                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Distro Comparison

Distro Based On Package Manager Best For
Ubuntu Debian apt Beginners, desktops, servers
Fedora Red Hat dnf Developers, cutting-edge
Debian Independent apt Stability, servers
Arch Independent pacman Advanced users, customization
Linux Mint Ubuntu apt Windows switchers
CentOS Stream Red Hat dnf Enterprise servers
openSUSE Independent zypper Enterprise, stability
Manjaro Arch pacman Arch without the complexity
Kali Debian apt Penetration testing
Pop!_OS Ubuntu apt Developers, gaming

Choosing a Distro

๐ŸŒฑ For Beginners

  • Ubuntu โ€” Largest community, most tutorials
  • Linux Mint โ€” Feels familiar if you're coming from Windows
  • Pop!_OS โ€” Great for gaming and NVIDIA hardware

๐Ÿ’ผ For Servers

  • Ubuntu Server โ€” Most popular cloud OS
  • Debian โ€” Rock-solid stability
  • Rocky Linux โ€” CentOS replacement for enterprise

๐Ÿ› ๏ธ For Learning & Customization

  • Arch Linux โ€” Build your system from the ground up
  • Gentoo โ€” Compile everything, maximum control
  • Linux From Scratch โ€” The ultimate learning experience

๐Ÿ” For Security

  • Kali Linux โ€” Penetration testing tools pre-installed
  • Tails โ€” Privacy-focused, runs from USB
  • Qubes OS โ€” Security through compartmentalization

The Open Source Philosophy

Linux is built on the principles of the Free Software Movement:

Freedom Description
Freedom 0 Run the program for any purpose
Freedom 1 Study how the program works and modify it
Freedom 2 Redistribute copies
Freedom 3 Distribute copies of your modified versions

Common Open Source Licenses

License Key Feature
GPL Modifications must remain open source
MIT Do almost anything, including closed source
Apache 2.0 Like MIT but with patent protection
BSD Very permissive, no copyleft

Why Learn Linux?

๐Ÿ“Š Linux Dominates

  • โ˜๏ธ 96.3% of the top 1 million web servers run Linux
  • ๐Ÿ–ฅ๏ธ 100% of the world's top 500 supercomputers run Linux
  • ๐Ÿ“ฑ 72% of all mobile devices run Android (Linux kernel)
  • ๐Ÿณ Docker & Kubernetes โ€” built for and on Linux
  • โ˜๏ธ AWS, GCP, Azure โ€” default OS is Linux

๐Ÿ’ฐ Career Benefits

  • DevOps, SRE, Cloud Engineering โ€” Linux is mandatory
  • Cybersecurity โ€” most tools are Linux-native
  • Software Development โ€” most servers deploy on Linux
  • Average Linux sysadmin salary: $80,000 โ€“ $130,000+

๐Ÿง  Technical Benefits

  • Deep understanding of how computers actually work
  • Full control over your operating system
  • Better security and privacy
  • Free forever โ€” no licenses, no subscriptions

๐Ÿ‹๏ธ Practice Exercises

  1. Research: Look up the latest stable Linux kernel version at kernel.org
  2. Explore: Visit DistroWatch and browse the top 10 distributions
  3. Reflect: Which distro sounds right for you and why?
  4. Read: Skim the GNU Philosophy page
  5. Install: If you haven't yet, download a Linux distro ISO โ€” we'll install it in the next chapter!

๐Ÿ  Home ยท Next: Installation & Setup โ†’

โšก