Linux FundamentalsSimulating Success ยท Learn
Beginner โ†’ Production
Foundations ยท A guided, hands-on course

Linux Fundamentals

Linux quietly runs the modern world โ€” the cloud, AI servers, your Android phone, and nearly every website you visit. This guide takes you from โ€œwhat is an operating system?โ€ all the way to the skills that power Docker, Kubernetes, distributed systems and AI infrastructure. No prior experience needed.

You'll learn: the shellfiles & permissionsprocesses networkingservicesscriptingand why it all matters
๐Ÿงญ
How to use this page Read top to bottom โ€” each section builds on the last. Whenever you see a black terminal, try the commands yourself in the interactive playground in Section 9. Green boxes are tips, purple are analogies, red are warnings.

01 Introduction to Operating Systems

Before Linux, understand the job every operating system does.

A computer is just electronics โ€” a processor (CPU) that does maths, memory (RAM) that holds work-in-progress, and storage (disk) that keeps files. On its own, that hardware doesn't know how to open a photo or run a browser.

๐Ÿฝ๏ธ
AnalogyAn operating system is the manager of a busy restaurant. Customers (apps) place orders, but they never walk into the kitchen. The manager (the OS) decides which chef (CPU) cooks what, how counter space (memory) is shared, where dishes are stored (files), and makes sure two orders don't collide. That coordination is the operating system.

Hardware vs Software

๐Ÿ”ฉ Hardware

The physical parts you can touch โ€” CPU, RAM, disk, keyboard, network card.

๐Ÿ’พ Software

Instructions that tell hardware what to do โ€” the OS itself, plus apps like a browser or editor.

What an operating system is responsible for

โš™๏ธ Process management

Starts, pauses and stops running programs, and shares the CPU between them.

๐Ÿง  Memory management

Gives each program the RAM it needs and protects programs from each other.

๐Ÿ“ File-system management

Organises data into files and folders on disk and controls access to them.

๐Ÿ–จ๏ธ Device management

Talks to hardware (disks, GPUs, printers) through drivers.

๐ŸŒ Network management

Sends and receives data over the network so machines can talk.

๐Ÿ” Security & users

Decides who may do what โ€” logins, permissions, isolation.

The three you'll meet most

OSBest known forUnder the hood
WindowsDesktops, gaming, office workClosed-source, made by Microsoft
macOSApple laptops & creative workBuilt on a UNIX foundation
LinuxServers, cloud, AI, phones (Android)Open-source โ€” anyone can read & improve it

02 History of Linux

Where it came from โ€” and why that story still shapes how Linux works.

Linux didn't appear out of nowhere. It's the latest chapter in a 50-year story that began with UNIX at Bell Labs.

1969UNIX is born at Bell Labs โ€” a small, elegant OS built by programmers, for programmers.
1970sโ€“80sUNIX spreads & splits โ€” BSD UNIX from Berkeley, plus commercial versions: IBM AIX, Sun Solaris, HP-UX.
1983The GNU Project โ€” Richard Stallman starts building free UNIX-compatible tools (the โ€œGNUโ€ utilities you still use today).
1991The Linux kernel โ€” a Finnish student, Linus Torvalds, writes a free UNIX-like kernel and shares it with the world.
TodayDistributions package the Linux kernel + GNU tools into ready-to-use systems: Ubuntu, Debian, Fedora, Rocky Linux, CentOS, Arch.
๐Ÿ’ก
The UNIX philosophyโ€œWrite programs that do one thing well, and work together.โ€ This is why Linux gives you dozens of tiny commands you can combine (with a | pipe) instead of one giant program. You'll feel this everywhere.

Why Linux succeeded

  • Free & open source โ€” no licence fees; the code is public.
  • A global community โ€” thousands of contributors fix and improve it daily.
  • It runs anywhere โ€” from a $5 sensor to the world's fastest supercomputers.

03 Why Learn Linux?

The payoff โ€” before we touch a single command.

What makes Linux special

Free & Open SourceStableSecureReliable PortableMulti-userMulti-taskingHighly scalable Great networkingHuge community

Where Linux actually runs

โ˜๏ธ Cloud

The vast majority of cloud servers run Linux.

๐Ÿค– AI servers

GPU training & inference happen on Linux.

๐ŸŒ Web servers

Most of the internet is served from Linux.

๐Ÿฆพ Supercomputers

All of the world's top 500 run Linux.

๐Ÿ“ฑ Android

Every Android phone runs a Linux kernel.

๐Ÿ“ก IoT & embedded

Routers, cameras, cars, smart devices.

๐Ÿฆ Data centres

Banks, exchanges and telecoms.

๐Ÿ›ก๏ธ Cybersecurity

Pen-testing & defence tooling.

๐ŸŽฏ
Career realityDocker, Kubernetes, OpenShift, DevOps, cloud and AI infrastructure are all built on Linux. Learn Linux well and every one of those becomes far easier to pick up.

04 Linux Architecture

The four layers โ€” from your app down to the metal.

ApplicationsBrowser, editor, Python, your programs โ€” the software you run
โ–ผ
ShellTranslates your typed commands into requests the system understands
โ–ผ
Linux KernelThe core: manages CPU, memory, files, devices & security
โ–ผ
HardwareCPU ยท RAM ยท Disk ยท Network ยท GPU

๐Ÿ‘ค User space

Where your apps and the shell live. If a program here crashes, the system keeps running.

๐Ÿ›ก๏ธ Kernel space

Privileged core code that talks directly to hardware. Protected from ordinary programs.

๐Ÿ“ž System calls

The โ€œfront deskโ€ โ€” how a program in user space politely asks the kernel to do something (open a file, use the network).

๐Ÿ”Œ Device drivers

Kernel modules that know how to speak to a specific piece of hardware.

๐Ÿš—
AnalogyThe kernel is the engine, the shell is the steering wheel & pedals, and applications are you deciding where to go. You never touch the engine directly โ€” you send instructions through the controls (system calls).

05 The Linux File System

One tree to rule them all โ€” starting at /.

๐Ÿ“„
Golden ruleIn Linux, everything is a file โ€” your documents, yes, but also devices (your disk is /dev/sda), running processes, even system settings. Learn to navigate files and you can control the whole system.

Unlike Windows (with C:, D: drives), Linux has a single tree that starts at the root directory /. Everything hangs off it.

/ โ”œโ”€โ”€ home # personal folders โ€” /home/student โ”œโ”€โ”€ root # the admin user's home โ”œโ”€โ”€ etc # system-wide configuration files โ”œโ”€โ”€ var # things that change: logs, mail, caches โ”œโ”€โ”€ usr # installed programs & their files โ”œโ”€โ”€ bin # essential commands (ls, cp, cat) โ”œโ”€โ”€ sbin # system/admin commands โ”œโ”€โ”€ opt # optional / third-party software โ”œโ”€โ”€ tmp # temporary files (wiped on reboot) โ”œโ”€โ”€ dev # devices (disks, USB) as files โ”œโ”€โ”€ proc # live view of the kernel & processes โ””โ”€โ”€ boot # files needed to start Linux
๐Ÿงญ
Remember these three/home is where your stuff lives, /etc is where settings live, and /var/log is where you look when something breaks.

06 The Building Blocks of Linux

The handful of core ideas the system is made of.

Everything you'll do in Linux is really about managing these abstractions:

๐Ÿ“„ Files

Named chunks of data.

๐Ÿ“ Directories

Folders that hold files.

โš™๏ธ Processes

Programs that are running.

๐Ÿงต Threads

Smaller units of work inside a process.

๐Ÿ‘ค Users

Accounts that own things.

๐Ÿ‘ฅ Groups

Users bundled for shared access.

๐Ÿ”‘ Permissions

Who can read/write/run what.

๐Ÿ”Œ Devices

Hardware exposed as files in /dev.

๐ŸŒ Network interfaces

Connections to other machines.

๐Ÿ” Services

Background programs (daemons).

๐Ÿš Shell

Your command interpreter.

๐ŸŒฑ Environment variables

Settings passed to programs.

07 Users and Login

Linux was multi-user from day one.

Many people (or programs) can use one Linux machine at once, each kept separate. There are two kinds of accounts you must know:

๐Ÿง‘ Normal user

Everyday account (e.g. student). Can only touch its own files. Safe.

๐Ÿ‘‘ root (superuser)

The all-powerful admin. Can change anything โ€” including break everything. Use with care.

โš ๏ธ
Golden safety ruleDo your normal work as a normal user. Only borrow admin powers when you truly need them, using sudo in front of a single command. Never โ€œliveโ€ as root.

Ways to log in

  • Console login โ€” typing your username & password at the machine itself.
  • SSH โ€” logging into a remote machine securely over the network (how you reach cloud servers):
ssh student@server-ip        # connect to a remote Linux machine

08 The Shell & Terminal

The single most important skill in this whole guide.

๐Ÿ–ฅ๏ธ Terminal

The window you type into โ€” a text screen for talking to the computer.

๐Ÿš Shell

The program inside that window that reads your commands and runs them. The most common one is Bash. (Zsh is a popular modern alternative.)

๐Ÿ—ฃ๏ธ
AnalogyThe terminal is the phone; the shell is the translator on the line who turns your words into instructions the system carries out.

Reading a command

ls -l /home/student
# โ””โ”ฌโ”˜  โ””โ”ฌโ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
#  command option    argument

A command has three parts: the command (what to do), options (how to do it, usually starting with -), and arguments (what to do it to).

09 Essential Commands TRY THEM BELOW โ†“

The everyday vocabulary of the command line.

๐Ÿงญ Navigation

pwd where am I ยท ls list ยท cd change dir ยท tree show as tree

๐Ÿ“„ Files

touch create ยท cp copy ยท mv move/rename ยท rm remove ยท mkdir/rmdir folders

๐Ÿ‘€ Viewing

cat whole file ยท less/more page through ยท head/tail top/bottom

๐Ÿ”Ž Searching

find by name ยท locate fast find ยท grep search inside files ยท which locate a command

๐Ÿ’ฝ Disk

df free space ยท du folder size ยท lsblk drives ยท mount attach storage

โ„น๏ธ System & help

uname ยท hostname ยท date ยท whoami ยท id ยท man & --help

โ“
Stuck on a command?Every command has a manual: type man ls to read it, or ls --help for a quick summary. You never need to memorise everything.

๐Ÿ–ฉ Interactive Linux terminal โ€” try it yourself

This is a safe, simulated Linux shell running in your browser. Nothing here can harm anything. Type a command and press Enter. Start with help, then try ls, pwd, cd Documents, cat notes.txt, whoami.

student@linux-lab โ€” bash clear
student@linux-lab:~$

10 File Permissions

The heart of Linux security โ€” who can do what.

Every file and folder answers three questions for three groups of people. The questions are Read (r), Write (w), and Execute (x). The people are the Owner, the Group, and Others.

-rwxr-xr--   1 student staff  # what ls -l shows you
 โ”‚โ””โ”ฌโ”˜โ””โ”ฌโ”˜โ””โ”ฌโ”˜
 โ”‚ โ”‚  โ”‚  โ”” others: r--  (read only)
 โ”‚ โ”‚  โ””โ”€โ”€โ”€ group:  r-x  (read + execute)
 โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€ owner:  rwx  (read + write + execute)
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ type:   -    (- = file, d = directory)
LetterOn a fileOn a folder
r readview its contentslist what's inside
w writechange itadd/remove files in it
x executerun it as a programenter it (cd into it)

๐Ÿงฎ chmod calculator โ€” click the boxes

Permissions are often written as a 3-digit number. Toggle what each group can do and watch the number build:

Read (4)Write (2)Exec (1)
Owner
Group
Others
755
rwxr-xr--
chmod 755 myfile

Commands

CommandWhat it does
chmod 755 fileSet permissions (owner rwx, others r-x)
chmod +x script.shMake a file executable
chown student fileChange the owner
chgrp staff fileChange the group
๐Ÿ’ก
Common ones to remember755 = programs & folders (everyone can use, only you can change) ยท 644 = normal files (you edit, others read) ยท 600 = private (only you).

11 Process Management

Everything running is a process โ€” here's how to watch and control them.

A process is a running program. Each has a unique number (PID). Processes can start other processes (a parent starting a child). Some run in the foreground (you wait for them); others in the background (they run while you keep working).

CommandWhat it does
ps auxList all running processes
top / htopLive, updating view of CPU & memory use
kill 1234Politely stop the process with PID 1234
kill -9 1234Force-stop (last resort)
killall firefoxStop every process by name
jobs ยท bg ยท fgManage background/foreground jobs
๐Ÿ“Š
Your go-to toolRun htop (or top) to see, at a glance, what's using your CPU and memory โ€” the first thing an engineer checks when a machine is slow.

12 Installing Software

No hunting for โ€œ.exeโ€ files โ€” Linux uses package managers.

A package manager installs, updates and removes software for you from trusted online repositories โ€” handling dependencies automatically. Which one you use depends on the distribution family:

๐ŸŸ  Debian / Ubuntu

sudo apt update            # refresh the catalog
sudo apt install git       # install a package
sudo apt upgrade           # update everything

๐Ÿ”ด RedHat / Fedora / Rocky

sudo dnf install git       # (older: yum)
sudo dnf update

13 Networking Basics

How your machine finds and talks to others.

๐Ÿ”ข IP address

A machine's number on the network, like 192.168.1.20.

๐Ÿท๏ธ Hostname

A friendly name for a machine, like web-server.

๐Ÿ“– DNS

The โ€œphone bookโ€ that turns names (google.com) into IP addresses.

๐Ÿšช Ports

Numbered doors on a machine โ€” web = 80/443, SSH = 22.

๐Ÿ” SSH

Secure remote login over the network.

๐Ÿ” Localhost

127.0.0.1 โ€” the machine talking to itself.

CommandWhat it does
ip aShow this machine's IP addresses
ping google.comCheck if another host is reachable
curl / wgetFetch data / download files from the web
ss -tulpnSee which ports are open (modern netstat)

14 Services (systemd)

The background programs that keep a server running.

A service (or daemon) is a program that runs quietly in the background โ€” a web server, a database, your monitoring script. On modern Linux, the manager in charge of starting and supervising them is systemd. It's also the first thing that runs when Linux boots.

CommandWhat it does
systemctl status nginxIs the service running? show details
sudo systemctl start / stop nginxStart or stop it now
sudo systemctl enable nginxStart it automatically at boot
journalctl -u nginxRead that service's logs
๐Ÿ”ง
When something won't startsystemctl status tells you if it failed; journalctl -u <service> tells you why. This pair solves most server problems.

15 Text Editors

You'll edit config files constantly โ€” pick an editor.

๐Ÿผ nano

Beginner-friendly. Shortcuts shown at the bottom. Start here. Save = Ctrl+O, exit = Ctrl+X.

โšก vi / vim

Everywhere, powerful, but modal. Worth learning because it's on every server.

๐Ÿงฐ Others

Once comfortable: VS Code (remote), emacs, micro.

Surviving vi โ€” the one thing beginners must know

vi has modes. This trips everyone up once:

Toโ€ฆDo this
Type textPress i (insert mode)
Stop typingPress Esc (back to command mode)
Save & quitType :wq then Enter
Quit without savingType :q! then Enter
๐Ÿ˜…
The classic trapโ€œHow do I exit vim?โ€ is a famous beginner panic. The answer: press Esc first, then type :q! to leave without saving. You're welcome.

16 Shell Scripting

Turn commands you repeat into a reusable program.

A shell script is just a text file full of commands. It's how you automate โ€” backups, deployments, health checks. Scripts understand variables, conditions, loops and functions.

#!/bin/bash
# greet.sh โ€” a first script

name="$1"                 # $1 = first argument

if [ -z "$name" ]; then
    name="world"
fi

for i in 1 2 3; do
    echo "($i) Hello, $name โ€” welcome to Linux!"
done
chmod +x greet.sh      # make it runnable
./greet.sh Ada         # run it with an argument
๐Ÿงฉ
The building blocksVariables store values ยท conditions (if) make decisions ยท loops (for/while) repeat work ยท functions group steps ยท arguments ($1 $2) pass input in.

17 Environment Variables

Little settings the whole system reads.

Environment variables are named values available to your shell and the programs it runs. A few you'll meet constantly:

VariableHolds
PATHThe list of folders searched when you type a command
HOMEYour home directory (/home/student)
USERYour username
SHELLWhich shell you're using
echo $HOME             # show one variable
printenv               # show them all
export EDITOR=nano     # set one for this session
๐Ÿ›ฃ๏ธ
Why PATH mattersWhen you type ls, the shell searches every folder in PATH to find that program. โ€œcommand not foundโ€ usually means it isn't on your PATH.

18 Linux Administration

Keeping a real system healthy.

๐Ÿ‘ค Users & groups

useradd, passwd, usermod, groupadd

๐Ÿ’ฝ Disk management

df, du, lsblk, mount

๐Ÿ“œ Log files

Live in /var/log; read with tail -f & journalctl

โฐ Cron jobs

Schedule tasks with crontab -e

๐Ÿ’พ Backups

tar, rsync for copies & archives

๐Ÿ“ˆ Monitoring

top, htop, free, uptime

# run a backup every day at 2am (crontab -e)
0 2 * * *  tar -czf /backup/home.tgz /home/student

19 Linux Security

A few habits that keep systems safe.

๐Ÿ”‘ Least privilege

Use a normal account; reach for sudo only when needed. Never browse or code as root.

๐Ÿ” SSH keys

Prefer key-based login over passwords; disable root SSH login.

๐Ÿงฑ Firewall

Open only the ports you need: sudo ufw allow 22, then sudo ufw enable.

๐Ÿ” Permissions

Keep private files at 600; don't chmod 777 to โ€œfixโ€ problems.

๐Ÿ”„ Updates

Patch regularly โ€” most breaches exploit known, unpatched bugs.

๐Ÿ“‘ Logs

Watch /var/log/auth.log for suspicious logins.

๐Ÿšซ
Never do thischmod 777 gives everyone full control of a file โ€” a classic security hole. And sudo rm -rf / tries to delete the entire system. Treat both as red buttons.

20 Linux in Modern Computing

Where this foundation takes you next.

Every powerful technology below runs on Linux. The commands you just learned โ€” files, permissions, processes, services, networking โ€” are exactly what these tools use under the hood.

๐Ÿ Python

The language of automation & AI.

๐Ÿ”€ Git

Version control for all your code.

๐Ÿณ Docker

Package apps into portable containers โ€” built directly on Linux features.

โ˜ธ๏ธ Kubernetes

Run & scale containers across many machines.

๐Ÿ•ธ๏ธ Distributed systems

Many Linux machines working as one.

โ˜๏ธ Cloud

AWS, Azure, GCP โ€” Linux everywhere.

๐Ÿค– AI servers

GPU training & inference on Linux.

๐Ÿ–ฅ๏ธ HPC clusters

Supercomputing for research.

๐Ÿ›ฐ๏ธ Edge / DevOps

Automation & on-device inference.

โœ“ Knowledge Check

Quick questions โ€” click an answer to see if you've got it.

1 ยท Which command shows your current directory?
2 ยท In Linux, what does โ€œeverything is a fileโ€ help you do?
3 ยท Permissions chmod 600 secret.txt meanโ€ฆ
4 ยท A service failed to start. Which command tells you why?

21 Hands-on Labs

Reading isn't enough โ€” do these on a real (or virtual) Linux box.

  1. 01
    Create your first directory structure and navigate it with absolute & relative paths.
  2. 02
    Create, copy, move and delete files with touch, cp, mv, rm.
  3. 03
    Edit a file with nano (then try vi) and save it.
  4. 04
    Add a new user and group; set a password.
  5. 05
    Watch CPU & memory live with htop.
  6. 06
    Install a package with apt (or dnf).
  7. 07
    Connect to another machine with ssh.
  8. 08
    Write and run your first Bash script.
  9. 09
    Schedule a daily backup with cron.
  10. 10
    Break & fix: stop a service, then diagnose it with systemctl & journalctl.

โžœ Your Learning Roadmap

Each step stands on the one before it โ€” that's the whole idea.

Linux Fundamentalsโ†’ Pythonโ†’ Gitโ†’ Dockerโ†’ Docker Composeโ†’ Kubernetesโ†’ Networkingโ†’ Distributed Systemsโ†’ AI Infrastructureโ†’ Production Deployment
๐ŸŒŸ
You are hereMaster the operating system first. Then containers, then orchestration, then the full production AI ecosystem โ€” every new topic will feel like a natural extension of what you already know.

๐Ÿ“– Mini Glossary

Plain-English definitions for the words that come up most.

Kernel
The core of Linux. It manages the CPU, memory, files and devices, and sits between your programs and the hardware.
Shell
The program that reads the commands you type and runs them. Bash is the most common.
Distribution (โ€œdistroโ€)
A ready-to-use Linux system = the kernel + tools + package manager. Examples: Ubuntu, Debian, Fedora.
root / sudo
root is the all-powerful admin user. sudo lets a normal user run one command as root, safely.
Process
A running program, identified by a number (PID). ps and top show them.
Daemon / Service
A program that runs in the background (e.g. a web server), managed by systemd.
Package manager
A tool (apt, dnf) that installs and updates software from trusted repositories.
Repository
An online catalog of software your package manager can install from.
SSH
Secure Shell โ€” the standard way to log into a remote Linux machine over the network.
Permissions (rwx)
Rules for who can read, write or execute a file โ€” for the owner, group and others.
โ†‘