Skip to content

🐧 Linux Fundamentals

Understanding the foundations of Linux, the operating system at the heart of Born2beroot.


Table of Contents

  1. What is Linux?
  2. The Linux Philosophy
  3. What is the Kernel?
  4. User Space vs Kernel Space
  5. Linux Distributions
  6. Debian
  7. Rocky Linux
  8. Why So Many Distributions?
  9. The Linux Boot Process
  10. BIOS and UEFI
  11. Bootloaders
  12. systemd
  13. The Shell
  14. Common Shells
  15. Terminal vs Shell
  16. Commands and Utilities
  17. Processes
  18. Process Lifecycle
  19. Foreground vs Background Processes
  20. Process IDs (PID)
  21. Files and Directories
  22. Linux Filesystem Hierarchy
  23. Important Directories
  24. Paths
  25. Hidden Files
  26. Environment Variables
  27. Package Managers
  28. Why Linux Dominates Servers
  29. Mental Model

1ī¸âƒŖ What is Linux?

Linux is an operating system.

An operating system sits between:

Hardware
    ↓
Operating System
    ↓
Applications

Without an operating system, applications would need to communicate directly with hardware.

Linux provides a stable and secure layer that allows software to run efficiently.


2ī¸âƒŖ The Linux Philosophy

Linux follows a simple philosophy:

Do one thing and do it well

Many Linux tools are intentionally small and focused.

Examples:

  • grep
  • cat
  • find
  • sort
  • chmod

Each solves a specific problem.


3ī¸âƒŖ What is the Kernel?

The kernel is the core of Linux.

Think of it as the operating system's manager.

Responsibilities include:

  • CPU scheduling
  • memory management
  • hardware communication
  • process management
  • filesystem access

4ī¸âƒŖ User Space vs Kernel Space

Linux separates the system into two worlds.

User Space

Applications run here.

Examples:

  • Firefox
  • VSCode
  • Python

Kernel Space

The kernel runs here.

Applications must ask permission before accessing hardware.

This separation improves security and stability.


5ī¸âƒŖ Linux Distributions

Linux itself is only the kernel.

A distribution combines:

  • Linux kernel
  • package manager
  • utilities
  • configuration tools
  • documentation

Examples:

  • Debian
  • Ubuntu
  • Rocky Linux
  • Fedora
  • Arch Linux

6ī¸âƒŖ Debian

Debian is one of the oldest and most respected Linux distributions.

Known for:

  • stability
  • reliability
  • large repositories
  • conservative updates

Many other distributions are based on Debian.


7ī¸âƒŖ Rocky Linux

Rocky Linux focuses on enterprise environments.

Known for:

  • Red Hat compatibility
  • long-term support
  • server usage

It is commonly found in professional infrastructures.


8ī¸âƒŖ Why So Many Distributions?

Different users have different goals.

Some prioritize:

  • stability
  • performance
  • security
  • ease of use
  • customization

This is why many Linux distributions exist.


9ī¸âƒŖ The Linux Boot Process

A simplified boot sequence:

Power On
    ↓
BIOS / UEFI
    ↓
Bootloader
    ↓
Kernel
    ↓
systemd
    ↓
Services
    ↓
Login

Understanding this sequence helps explain how Linux starts.


🔟 BIOS and UEFI

These systems initialize hardware before Linux starts.

Responsibilities:

  • detect hardware
  • perform checks
  • locate boot devices

UEFI is the modern replacement for BIOS.


1ī¸âƒŖ1ī¸âƒŖ Bootloaders

A bootloader loads the operating system.

One common example is:

GRUB

Its job is to locate and start the Linux kernel.


1ī¸âƒŖ2ī¸âƒŖ systemd

systemd is responsible for managing the system after the kernel starts.

It handles:

  • service startup
  • dependencies
  • logging
  • process supervision

Modern Linux distributions rely heavily on systemd.


1ī¸âƒŖ3ī¸âƒŖ The Shell

The shell is the interface between the user and the operating system.

You type commands:

ls
pwd
cd

The shell interprets them and communicates with the system.


1ī¸âƒŖ4ī¸âƒŖ Common Shells

Examples include:

  • Bash
  • Zsh
  • Fish
  • Dash

Bash remains the most widely known shell.


1ī¸âƒŖ5ī¸âƒŖ Terminal vs Shell

These terms are often confused.

Terminal

The application window.

Shell

The program running inside that window.

Example:

Terminal
    ↓
Bash

1ī¸âƒŖ6ī¸âƒŖ Commands and Utilities

Linux provides many small tools.

Examples:

ls
pwd
cat
grep
find

Combining small tools is one of Linux's greatest strengths.


1ī¸âƒŖ7ī¸âƒŖ Processes

A process is a running program.

Examples:

Python Script
Browser
SSH Server

Every running application becomes a process.


1ī¸âƒŖ8ī¸âƒŖ Process Lifecycle

A process typically follows:

Created
   ↓
Running
   ↓
Waiting
   ↓
Finished

The kernel manages this lifecycle.


1ī¸âƒŖ9ī¸âƒŖ Foreground vs Background Processes

Foreground

Runs directly in the terminal.

Background

Runs independently.

Examples include:

  • servers
  • monitoring services
  • daemons

2ī¸âƒŖ0ī¸âƒŖ Process IDs (PID)

Every process receives a unique identifier.

Example:

PID 100
PID 250
PID 421

The kernel uses these IDs to manage processes.


2ī¸âƒŖ1ī¸âƒŖ Files and Directories

Linux treats almost everything as a file.

Examples:

  • documents
  • devices
  • logs
  • configuration files

This creates a consistent environment.


2ī¸âƒŖ2ī¸âƒŖ Linux Filesystem Hierarchy

Linux follows a standard structure.

/
├── home
├── etc
├── usr
├── var
├── boot
└── tmp

Everything starts from the root directory.


2ī¸âƒŖ3ī¸âƒŖ Important Directories

/home

User files.

/etc

Configuration files.

/var

Logs and changing data.

/boot

Boot-related files.

/tmp

Temporary files.


2ī¸âƒŖ4ī¸âƒŖ Paths

Linux uses paths to locate files.

Example:

/home/student/document.txt

Paths can be:

  • absolute
  • relative

2ī¸âƒŖ5ī¸âƒŖ Hidden Files

Files beginning with:

.

are hidden by default.

Examples:

.bashrc
.profile
.gitignore

2ī¸âƒŖ6ī¸âƒŖ Environment Variables

Environment variables store configuration values.

Examples:

PATH
HOME
USER
SHELL

Applications often rely on them.


2ī¸âƒŖ7ī¸âƒŖ Package Managers

Package managers simplify software installation.

Examples:

  • apt
  • dnf
  • yum

They manage:

  • installation
  • updates
  • dependencies

2ī¸âƒŖ8ī¸âƒŖ Why Linux Dominates Servers

Linux powers most servers because it offers:

✅ Stability

✅ Performance

✅ Security

✅ Flexibility

✅ Open-source development

Many cloud platforms rely heavily on Linux.


2ī¸âƒŖ9ī¸âƒŖ Mental Model

Think of Linux as:

The operating system city

The kernel is:

The city manager

Processes are:

The citizens

The filesystem is:

The map

And the shell is:

Your way of communicating with the city