Article

Introduction to Linux: What It Is, Why It Rules the World, and How to Think Like a Linux Engineer

15 min read
Originally published on Medium. Read, clap or comment on Medium ↗

Linux runs 96% of the world’s top web servers, every Android phone, the International Space Station, and the computers that power modern AI. Understanding it isn’t optional anymore — it’s foundational.

Linux Zero to Hero · Episode 01 ·

Here is a fact that surprises most people outside of tech: you have used Linux today. Almost certainly multiple times.

When you searched Google, your query hit a Linux server. When you streamed Netflix, the video came from a Linux server. When you checked your Android phone, you ran Linux. When your bank processed a transaction, Linux was involved. The world’s most critical infrastructure — financial systems, hospitals, power grids, satellites, supercomputers — runs on Linux.

And yet most engineers treat Linux as something to get through rather than something to understand. They learn the minimum — ls, cd, ssh into a server, copy a command from Stack Overflow, hope it works. That approach has a ceiling, and you hit it at the worst possible moment: 2 AM, production is down, and you're staring at a terminal with no idea what to do next.

This series is built for something different. We’re going from first principles to genuine fluency — the kind that lets you diagnose anything, automate confidently, and feel at home on any Linux machine regardless of distro, version, or context.

Let’s start at the beginning.

What Is Linux?

Linux is an operating system kernel — the core software that manages the relationship between your hardware and everything running on top of it. It handles CPU scheduling, memory management, device I/O, filesystem access, and networking. Everything else — the shell, the tools, the graphical interface — sits on top of it.

Technically, what most people call “Linux” is actually GNU/Linux: the Linux kernel combined with the GNU project’s tools (shell, compilers, utilities). But in practice everyone calls the whole thing Linux, and so will we.

Linux was created in 1991 by a Finnish computer science student named Linus Torvalds, who wanted a free, Unix-like operating system for his personal computer. He announced it on a Usenet newsgroup with one of the most understated posts in computing history — describing it as “just a hobby, won’t be big and professional like GNU.” That hobby now runs the internet.

What makes Linux different from Windows or macOS isn’t just that it’s free. It’s the philosophy.

The Unix Philosophy: Why Linux Thinks the Way It Does

Linux inherits its design principles from Unix, the operating system developed at Bell Labs in the 1970s. These principles shape everything about how Linux works — the tools, the commands, the file structure, all of it.

The Unix philosophy in three sentences:

Write programs that do one thing and do it well. ls lists files. grep searches text. sort sorts lines. Each tool is small, focused, and excellent at its single job.

Write programs that work together. Tools communicate through text streams. The output of one program becomes the input of another. This is the pipe: ls | grep ".log" | sort.

Write programs that handle text streams, because that is a universal interface. Everything in Linux — configuration, logs, process info, device state — is represented as text that tools can read, write, and transform.

This philosophy is why a 40-year-old command still works perfectly in 2025. It’s why you can chain five tools together on the command line to do something powerful in ten seconds. It’s why Linux is learnable — there’s a consistent, predictable logic underlying everything.

# The Unix philosophy in action
# Count how many times each HTTP status code appears in a log file
cat access.log | grep "HTTP" | awk '{print $9}' | sort | uniq -c | sort -rn
# Five tools. One pipeline. Instant answer.
# cat reads, grep filters, awk extracts, sort groups, uniq counts

The Linux Ecosystem: Distros, Kernels, and Choices

One thing that confuses newcomers: there is no single “Linux.” There are hundreds of distributions (distros) — each one bundles the Linux kernel with a different collection of software, configuration defaults, package managers, and target audiences.

They all share the same kernel and core tools. Learning one means you can navigate any of them.

The Major Distro Families

Debian/Ubuntu family — The most popular family for servers and developer workstations. Ubuntu is the dominant choice for new Linux users and cloud deployments. Debian is the rock-solid upstream that Ubuntu builds on. Package manager: apt.

# Debian/Ubuntu
sudo apt update && sudo apt install nginx

Red Hat family — The enterprise standard. Red Hat Enterprise Linux (RHEL) and its free derivatives (Rocky Linux, AlmaLinux) dominate corporate data centers. CentOS was in this family until Red Hat changed its model in 2021. Fedora is the community innovation playground. Package manager: yum or dnf.

# RHEL/Rocky/Fedora
sudo dnf install nginx

Arch Linux — Rolling release, minimal by default, highly configurable. Popular with engineers who want to build their system from scratch and understand every component. Not for beginners, but deeply educational. Package manager: pacman.

Alpine Linux — Extremely minimal. 5MB base image. The standard base for Docker containers because of its tiny size and security-focused design.

Others worth knowing: Kali Linux (penetration testing), Raspbian/Raspberry Pi OS (IoT/embedded), openSUSE (European enterprise alternative).

Which Distro Should You Learn On?

For this series: Ubuntu 22.04 LTS or Ubuntu 24.04 LTS. Here’s why:

Everything in this series runs on Ubuntu. About 90% of it runs identically on any distro. We’ll flag the differences when they matter.

Setting Up Your Environment

You need a Linux terminal to follow this series. Three options depending on your situation:

Option 1: WSL2 on Windows (Recommended for Windows users)

Windows Subsystem for Linux 2 gives you a real Linux kernel running natively inside Windows. The best Windows developer experience available.

# In PowerShell as Administrator
wsl --install
# This installs Ubuntu by default
# Restart when prompted
# On next boot, set your Linux username and password

After installation, open “Ubuntu” from the Start menu. You have a full Linux terminal.

Option 2: macOS Terminal

macOS is Unix-based. The terminal works for most of this series. Install Homebrew and you have access to most Linux tools.

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install common Linux tools
brew install coreutils grep gnu-sed gawk

Note: some system-level topics (systemd, certain filesystem operations) don’t apply on macOS. We’ll note when this is the case.

Option 3: A Real Linux VM or Cloud Instance

The most authentic experience. Spin up a free-tier AWS EC2 instance (Ubuntu 22.04), a DigitalOcean droplet ($4/month), or a VirtualBox VM on your local machine.

# If using AWS EC2, connect via SSH
ssh -i your-key.pem ubuntu@<PUBLIC-IP>
# You're now on a real Linux machine

Verify Your Setup

# Check your Linux version
uname -a
# Linux ubuntu 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
# Check the distro
cat /etc/os-release
# NAME="Ubuntu"
# VERSION="22.04.3 LTS (Jammy Jellyfish)"
# Check your shell
echo $SHELL
# /bin/bash
# Who are you?
whoami
# ubuntu

The Terminal: Your Primary Interface

The terminal is where Linux lives. Not the file manager. Not a GUI. The terminal.

This intimidates newcomers more than anything else about Linux. The blank prompt feels hostile — no menus, no buttons, no hints. But that blankness is actually a feature. The terminal gives you direct, unmediated access to the operating system. There’s no GUI layer adding latency, hiding options, or making decisions for you.

Anatomy of the Shell Prompt

ubuntu@web-server-01:~/projects$
│ │ │ │
│ │ │ └── $ = regular user (# = root)
│ │ └── current directory (~ = home)
│ └── hostname of this machine
└── username

Every piece of that prompt is information. When something goes wrong, the prompt tells you who you are, where you are, and what machine you’re on.

Your First Commands

# Where am I?
pwd
# /home/ubuntu
# What's here?
ls
# Desktop Documents Downloads projects
# More detail
ls -la
# total 48
# drwxr-xr-x 6 ubuntu ubuntu 4096 Jan 15 10:30 .
# drwxr-xr-x 3 root root 4096 Jan 10 09:00 ..
# -rw-r--r-- 1 ubuntu ubuntu 220 Jan 10 09:00 .bash_logout
# -rw-r--r-- 1 ubuntu ubuntu 3526 Jan 10 09:00 .bashrc
# drwxr-xr-x 2 ubuntu ubuntu 4096 Jan 15 10:30 projects
# Move around
cd projects
pwd
# /home/ubuntu/projects
# Go back
cd ..
pwd
# /home/ubuntu
# Go home
cd
pwd
# /home/ubuntu
# Make a directory
mkdir my-first-dir
cd my-first-dir
# Create a file
touch hello.txt
ls
# hello.txt
# Write something to it
echo "Hello, Linux" > hello.txt
# Read it
cat hello.txt
# Hello, Linux

Getting Help: The Manual Pages

Every Linux command has a manual page. This is not optional background reading — it is the primary documentation, always available, always accurate.

# Read the manual for ls
man ls
# Navigate: arrow keys to scroll, / to search, q to quit
# Quick one-line description of any command
whatis ls
# ls (1) - list directory contents
# Find which command does something
apropos "list directory"
# ls (1) - list directory contents
# dir (1) - list directory contents
# Most commands also have a --help flag
ls --help
grep --help
💡 Make man your reflex. Before Googling a command option, run man <command>. You'll find the exact flag you need faster, you'll learn adjacent flags you didn't know existed, and you'll build the habit that makes you self-sufficient on any Linux machine — even one with no internet access.

Everything Is a File

This is the single most important concept in Linux. Internalize it and the entire system becomes more legible.

In Linux, virtually everything is represented as a file — including things that are not files in the conventional sense:

# Your hard disk
/dev/sda # the first disk
/dev/sda1 # the first partition on that disk
# System memory information
cat /proc/meminfo
# MemTotal: 16384000 kB
# MemFree: 8192000 kB
# ...
# Running processes
ls /proc/
# 1 2 3 ... (one directory per process ID)
cat /proc/1/status # information about process 1 (systemd/init)
# CPU information
cat /proc/cpuinfo
# Your terminal
ls -la /dev/pts/
# crw--w---- 1 ubuntu tty 136, 0 Jan 15 10:30 0 ← your terminal session
# Network interfaces
cat /proc/net/dev

Why does this matter? Because it means every Linux tool that can read a file can read system information. It means configuration is always in a predictable location. It means you can use text processing tools on hardware state. It means there are no special APIs — just files.

The Linux Directory Structure

Linux has a standardised filesystem hierarchy. Knowing where things live makes navigation instinctive and debugging faster.

/                   ← root — the top of the entire filesystem
├── bin/ ← essential user binaries (ls, cat, grep...)
├── sbin/ ← system binaries (fdisk, ifconfig, reboot...)
├── etc/ ← system configuration files
├── home/ ← user home directories (/home/ubuntu, /home/alice...)
├── root/ ← home directory for the root user
├── var/ ← variable data (logs, databases, mail spools)
│ ├── log/ ← system and application logs
│ └── www/ ← web server files
├── tmp/ ← temporary files (cleared on reboot)
├── usr/ ← user programs and data
│ ├── bin/ ← most user commands live here
│ ├── lib/ ← libraries
│ └── share/ ← architecture-independent data
├── lib/ ← shared libraries needed by /bin and /sbin
├── dev/ ← device files (disks, terminals, null device...)
├── proc/ ← virtual filesystem exposing kernel/process info
├── sys/ ← virtual filesystem exposing hardware info
├── mnt/ ← temporary mount points
├── media/ ← removable media mount points (USB drives, CDs)
├── opt/ ← optional third-party software
└── boot/ ← bootloader and kernel files

The directories you’ll live in most:

# Configuration for everything
ls /etc/
# nginx/ ssh/ hosts passwd fstab crontab...
# Logs for everything
ls /var/log/
# syslog auth.log kern.log nginx/ mysql/...
# Your home directory
ls ~
# equivalent to ls /home/ubuntu
# Where commands live
ls /usr/bin/ | head -20
# awk bash cat chmod chown cp curl cut date...

Absolute vs Relative Paths

Every file and directory in Linux has two addresses: an absolute path and a relative path.

Absolute path — starts from root (/). Always unambiguous. Works from anywhere.

# These always refer to the same file, regardless of where you are
cat /home/ubuntu/projects/app.py
ls /etc/nginx/nginx.conf

Relative path — starts from where you currently are. Shorter, context-dependent.

# If you're in /home/ubuntu:
cat projects/app.py # relative to current location
cat ./projects/app.py # ./ explicitly means "here"
cat ../ubuntu/projects/app.py # ../ means "go up one level"

Special path symbols:

~           # your home directory (/home/ubuntu)
. # current directory
.. # parent directory
- # previous directory (cd - takes you back)
# Practical example
cd /var/log
cat /etc/nginx/nginx.conf # absolute — works from anywhere
cat ../../etc/nginx/nginx.conf # relative — go up twice from /var/log

Input, Output, and Redirection

Every Linux command has three standard streams:

You can redirect these streams to and from files, and pipe them between commands:

# Redirect stdout to a file (overwrite)
ls -la > files.txt
cat files.txt # the output of ls is now in a file
# Redirect stdout to a file (append)
echo "first line" > log.txt
echo "second line" >> log.txt
cat log.txt
# first line
# second line
# Redirect stderr to a file
grep "pattern" /etc/hosts 2> errors.txt
# Redirect both stdout and stderr
command > output.txt 2>&1
# or in modern bash:
command &> output.txt
# Pipe: stdout of one command becomes stdin of the next
cat /etc/passwd | grep ubuntu
ls -la | sort -k5 -n | tail -5 # 5 largest files in current directory
# Discard output (send to /dev/null — the black hole)
command > /dev/null 2>&1

This redirection model is what makes the Unix pipeline so powerful — any command can feed any other command, and any output can be saved, filtered, or discarded.

Root, Sudo, and the Principle of Least Privilege

Linux has a clear privilege hierarchy.

Regular users — can only affect their own files and processes. Cannot modify system files, install software, or change system configuration.

Root — the superuser. UID 0. Can do absolutely anything on the system. Modify any file, kill any process, change any configuration. No restrictions.

sudo — a mechanism that lets regular users run specific commands with elevated privileges without becoming root permanently.

# Who am I?
whoami
# ubuntu
# Try to read a sensitive file as a regular user
cat /etc/shadow
# cat: /etc/shadow: Permission denied
# Use sudo to run it with elevated privileges
sudo cat /etc/shadow
# [sudo] password for ubuntu:
# root:!:19000:0:99999:7:::
# ubuntu:$6$xyz...:19000:0:99999:7:::
# Switch to root shell (use sparingly)
sudo su -
whoami
# root
exit
# Run a command as a different user
sudo -u www-data cat /var/www/html/index.html
⚠️ The principle of least privilege: Always use the minimum permissions needed for the task at hand. Don’t run your application as root. Don’t sudo every command out of habit. Don't stay in a root shell when you don't need to be. Every unnecessary permission is a risk — if your process is compromised, it can only damage what it has access to. This principle runs throughout Linux and, as we saw in the Kubernetes series, through the entire DevOps world.

Getting Help When You’re Stuck

Linux has excellent built-in documentation. Use it before searching the internet.

# Full manual (most comprehensive)
man ls
man grep
man bash # the entire bash shell documentation
# Short help flag (faster)
ls --help
grep --help
# Info pages (more detailed than man for some tools)
info coreutils
# Which binary does a command run?
which python3
# /usr/bin/python3
which ls
# /bin/ls
# Where did this package install things?
dpkg -L nginx # Debian/Ubuntu
rpm -ql nginx # RHEL/Rocky
# What version is installed?
nginx -v
python3 --version
bash --version

And when you do need to search the internet — be specific. “Linux list files sorted by size” returns better results than “Linux ls”. Always include your distro and version when asking for help.

Hands-On Lab: Your First Linux Session

Work through this sequence on your terminal. Don’t copy-paste — type every command. The muscle memory matters.

# 1. Orient yourself
whoami
hostname
uname -r # kernel version
cat /etc/os-release | head -5
# 2. Navigate the filesystem
pwd
ls /
cd /etc
ls | head -20
cd /var/log
ls -lh # -h for human-readable file sizes
cd ~ # back home
# 3. Create your workspace
mkdir -p linux-lab/episode-01
cd linux-lab/episode-01
# 4. Work with files
echo "I am learning Linux" > notes.txt
echo "This is episode 01" >> notes.txt
echo "$(date)" >> notes.txt
cat notes.txt
# 5. Explore the pipeline
cat notes.txt | wc -l # count lines
cat notes.txt | grep "Linux" # filter lines
ls /usr/bin | wc -l # how many commands are installed?
# 6. Redirect output
ls /usr/bin > all-commands.txt
wc -l all-commands.txt # how many lines?
grep "py" all-commands.txt # find Python-related commands
grep "^g" all-commands.txt # commands starting with 'g'
# 7. Read the manual
man ls
# Press / then type -l and hit Enter to search for the -l flag
# Press q to quit
# 8. Check system info
cat /proc/cpuinfo | grep "model name" | head -1
cat /proc/meminfo | grep "MemTotal"
df -h # disk usage
free -h # memory usage
uptime # how long has the system been running?
# 9. Find where things live
which bash
which python3
ls /bin | grep bash
# 10. Clean up
cd ~
ls linux-lab/episode-01/

By the time you finish step 10, you’ve navigated the filesystem, created files, used pipelines, read the manual, and checked system information. That’s your first real Linux session.

The Mindset Shift

Before we close, something that isn’t a command or a concept but matters more than either.

Learning Linux requires a mindset shift that most engineers resist: embracing the unknown and reading the output.

When a command fails, Linux tells you why. Read the error message. The full message. Every word. Most Linux errors are self-describing — “Permission denied” means permissions. “No such file or directory” means the path is wrong. “command not found” means it’s not installed or not in your PATH.

When something works but you’re not sure why, investigate. man, --help, which, cat /proc/, ls -la — the tools to understand what happened are always available. Don't just copy a command that works without understanding it. The next time you need to adapt it, you'll be stuck.

The engineers who become genuinely fluent in Linux aren’t the ones who memorize the most commands. They’re the ones who’ve internalized the mental model — everything is a file, tools compose, text is the universal interface — and can reason their way to a solution even in unfamiliar territory.

That’s what this series is building toward.

What’s Next

In Episode 02, we go deep on the Linux Filesystem — the full directory hierarchy, file types, inodes, hard links vs symlinks, permissions in detail, and how to find anything on a system in seconds. Understanding the filesystem is what makes every subsequent topic — processes, networking, security — actually make sense.

Episode Topic
EP 01 ← You are here Introduction to Linux
EP 02 The Linux Filesystem
EP 03 Essential Linux Commands
EP 04 Users, Groups & Permissions
EP 05 Shell & Bash Scripting
EP 06 Text Processing Power Tools Bonus Vim: The Editor That Lives in Every Server
EP 07 Processes & Job Control
EP 08 Linux Networking Fundamentals
EP 09 Storage & Disk Management
EP 10 Package Management
EP 11 Linux Security Hardening
EP 12 Performance Monitoring & Troubleshooting

Before the Next Article

Three things to do before Episode 02:

  1. Make sure your Linux environment is set up and you can open a terminal. Run uname -a and confirm you see a Linux kernel version.
  2. Explore the /etc directory — open five config files at random with cat. You don't need to understand them yet. Just notice the pattern: everything is readable text.
  3. Run man man — the manual for the manual. Read the DESCRIPTION section. Learn how manual pages are structured so you can navigate any of them efficiently.

Every expert Linux engineer started exactly where you are — staring at a blank prompt, not sure what to type. The difference between them and an engineer who never gets comfortable with Linux is simple: they kept going. See you in Episode 02.

← All articles Discuss on Medium ↗