Linux Tutorial for Beginners: Learn Linux Step by Step
What Is Linux?
Linux is a free, open-source operating system created by Linus Torvalds in 1991. Technically, "Linux" is just the kernel — the core program that manages your computer's hardware. The full operating system you actually use is a Linux distribution — the kernel plus the GNU tools, a package manager, a desktop environment, and thousands of apps.
Linux is everywhere:
- Most web servers (Nginx, Apache running on Linux)
- All Android phones (Android is built on Linux)
- Most supercomputers (top 500 list is overwhelmingly Linux)
- Cloud platforms (AWS, Google Cloud, Azure all Linux-first)
- Routers, smart TVs, ATMs, embedded devices
- The International Space Station
Why Learn Linux in 2026?
Three honest reasons it's still the highest-leverage skill in computing:
- Servers run Linux. If you build software, deploy software, or manage software, you'll work with Linux. Cloud computing made this even more universal — AWS, GCP, Azure all default to Linux.
- The skills compound. Linux skills transfer to macOS Terminal (Unix-based), to Android (Linux-based), to Docker containers (Linux), to Kubernetes (Linux), to embedded systems (often Linux). Few skills give you this much portability.
- It's free forever. No license fees, no activation, no telemetry. You can install the same Ubuntu or Fedora on 1 machine or 10,000 with no cost. For students and self-learners, this matters.
Which Linux Distribution Should You Choose?
This is the first decision every Linux beginner faces. Honest recommendations:
| Distribution | Best For | Family |
|---|---|---|
| Ubuntu | Most beginners — start here unless you have a reason not to | Debian |
| Linux Mint | Windows users — looks/feels familiar | Debian/Ubuntu |
| Fedora | Latest software, cutting edge, Red Hat family | RedHat |
| Pop!_OS | Laptops, NVIDIA GPUs, developers | Debian/Ubuntu |
| RHEL / Rocky / AlmaLinux | Enterprise servers, learning RHCSA | RedHat |
| Debian | Servers, stability over freshness | Debian |
| Arch Linux | Experienced users who want control | Arch |
| Kali Linux | Security testing only — not for general use | Debian |
Distribution Families: Why It Matters
Most Linux distributions fall into one of three families. The distinction matters because package management and a few system commands differ between families. Core commands (ls, grep, vim) are identical everywhere.
| Family | Members | Package Manager | Install Command |
|---|---|---|---|
| RedHat | RHEL, Fedora, CentOS, Rocky, AlmaLinux | RPM / dnf / yum | sudo dnf install nginx |
| Debian | Debian, Ubuntu, Mint, Pop!_OS, Kali | DEB / apt | sudo apt install nginx |
| Arch | Arch, Manjaro, EndeavourOS | pacman | sudo pacman -S nginx |
This tutorial uses RedHat-family examples (since the chapters are based on Red Hat Linux), but every concept applies equally to Ubuntu and other distributions. Where commands differ, we'll note both.
How to Try Linux Without Installing
You don't need to commit a hard drive to learn Linux. Five free options:
| Method | Best For | Setup |
|---|---|---|
| WSL (Windows Subsystem for Linux) | Windows 10/11 users | Open PowerShell as admin: wsl --install |
| VirtualBox VM | Any OS — full Linux desktop in a window | Install VirtualBox, download Ubuntu .iso, create VM |
| Live USB | Try without touching your hard drive | Write Ubuntu .iso to USB with Rufus or balenaEtcher, boot from USB |
| Cloud shell | Browser-only — no install | Google Cloud Shell — 5GB free |
| Online terminal | Quick experiments | Online terminals |
wsl --install in admin PowerShell sets up Ubuntu in under 10 minutes. Files share between Windows and Linux automatically.
Your First Linux Commands
Open a terminal (any distribution, or WSL, or macOS) and try these. Every single one works on every Linux distribution.
# Where am I? $ pwd /home/alice # What's here? $ ls Documents Downloads Pictures Music # Who am I? $ whoami alice # What's my Linux version? $ cat /etc/os-release # How much disk space? $ df -h # How much RAM is in use? $ free -h # What's running on my system? $ top # press q to quit
Installing Software on Linux
One of Linux's superpowers: package managers. Instead of downloading installers, you tell the system what you want and it handles everything.
# RedHat / Fedora / Rocky / AlmaLinux: $ sudo dnf install firefox $ sudo dnf update # update everything $ sudo dnf remove firefox # uninstall $ dnf search photo # find packages # Ubuntu / Debian / Mint: $ sudo apt install firefox $ sudo apt update && sudo apt upgrade $ sudo apt remove firefox $ apt search photo
One command, no clicking through installers, no bundled adware, no license keys.
The Linux File System
Linux organizes everything as a tree starting at /. Even hardware devices and running processes show up as files. The most important locations:
| Path | What's There |
|---|---|
/ | Root of the entire file system |
/home/username | Your personal files (also ~) |
/etc | System configuration files |
/bin and /usr/bin | Standard programs (ls, cp, vim, etc.) |
/usr/local | Software you've manually installed |
/var | Variable data — logs, mail, databases |
/var/log | System and application log files |
/tmp | Temporary files (cleared on reboot) |
/dev | Device files (disks, USB, terminals) |
/proc | Live information about the running kernel |
/boot | Kernel and bootloader files |
File Permissions: The Linux Security Model
Every file and folder has three permission groups: owner, group, others. Each group has read (r), write (w), execute (x) permissions. Run ls -la to see them:
$ ls -la -rw-r--r-- 1 alice users 4096 Apr 25 14:32 notes.txt drwxr-xr-x 2 alice users 4096 Apr 25 14:30 Documents -rwxr-xr-x 1 alice users 8192 Apr 25 14:31 backup.sh
Reading the permissions string -rw-r--r--:
- First character:
-= file,d= directory,l= symlink - Next 3: owner permissions (rw- = read+write, no execute)
- Next 3: group permissions (r-- = read only)
- Last 3: everyone else (r-- = read only)
Change permissions with chmod:
# Make a script executable $ chmod +x backup.sh # Read+write for owner, read-only for everyone else $ chmod 644 notes.txt # Read+write+execute for owner, nothing for anyone else $ chmod 700 secret.sh
The Shell: Where Linux Lives
The shell is the program that interprets your commands. Linux has several:
| Shell | Where It's Default | Notes |
|---|---|---|
| bash | Most Linux distributions | Most documented; learn this first |
| zsh | macOS (since 2019), some Linux setups | Bash-compatible with extras |
| fish | None by default | User-friendly, autosuggestions; not bash-compatible |
| sh | Minimal systems, scripts | The original Bourne shell from 1977 |
| ksh | Some enterprise Unix | Korn shell — between sh and bash |
| csh / tcsh | BSD systems | C-like syntax; less common today |
For learning: stick with bash. It's the default on every major Linux distribution and the most documented shell anywhere.
The Power of Pipes
Linux's secret weapon: combining small commands with the pipe character |. The output of one command becomes the input of another.
# How many .conf files in /etc? $ ls /etc/*.conf | wc -l # Find every line containing "error" in any log file $ grep -r "error" /var/log/ # Find the 5 biggest files in current directory $ du -h | sort -h | tail -5 # Show only Python processes, sorted by memory usage $ ps aux | grep python | sort -k6 -nr # Total memory used by all Chrome processes $ ps aux | grep chrome | awk '{sum+=$6} END {print sum/1024" MB"}'
Common Beginner Mistakes
1. Running rm -rf Without Thinking
rm -rf / as root will destroy your system. There's no Recycle Bin — files are gone. Always check what directory you're in (pwd) and what you're deleting before pressing Enter.
2. Using sudo Everywhere
sudo grants temporary root powers. Use it only when you actually need them — installing software, editing system files, managing services. Routine work in your home directory should never need sudo.
3. Editing System Files Without Backups
Before editing anything in /etc, copy it first:
$ sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak $ sudo nano /etc/nginx/nginx.conf
4. Forgetting Linux Is Case-Sensitive
readme.txt and README.txt are different files. Documents and documents aren't the same folder. Coming from Windows, this trips up everyone at first.
5. Ignoring Logs When Something Breaks
When something doesn't work, check the logs. They almost always tell you what's wrong:
$ journalctl -xe # systemd journal $ tail -50 /var/log/syslog # Debian/Ubuntu $ tail -50 /var/log/messages # RedHat/Fedora $ dmesg # kernel messages
Complete Learning Path
The 63 chapters below cover everything from "what is Linux" through advanced system administration. Work through them in order, or jump to the section that fills your specific gap. Each chapter takes 25-40 minutes.
Part I — Getting Started with Linux (Chapters 1–6)
Part II — Linux Commands and File System (Chapters 7–9)
Part III — Shells and Scripting (Chapters 10–13)
Part IV — Communication, Documentation, Editing (Chapters 14–20)
Part V — X Window System (Chapters 21–25)
Part VI — Programming on Linux (Chapters 26–35)
Part VII — System Administration (Chapters 36–41)
Part VIII — Networking (Chapters 42–50)
Part IX — Advanced Linux (Chapters 51–60)
Appendices — Resources
Linux Command Cheat Sheet
The 30 commands that handle 90% of daily Linux work:
| Task | Command |
|---|---|
| Where am I? | pwd |
| List files | ls or ls -la |
| Change directory | cd /path or cd ~ (home) |
| Make folder | mkdir new-folder |
| Copy file | cp source dest |
| Copy folder | cp -r source/ dest/ |
| Move/rename | mv old new |
| Delete | rm file / rm -rf folder (careful!) |
| View file | cat file or less file |
| Search inside files | grep "text" file |
| Find files | find . -name "*.txt" |
| Disk usage | df -h (drives), du -sh folder (folder) |
| Memory usage | free -h |
| Running processes | ps aux or top or htop |
| Kill process | kill PID or kill -9 PID |
| Make executable | chmod +x script.sh |
| Change owner | sudo chown user:group file |
| Become root | sudo command |
| Edit file | nano file (easy) or vim file |
| Install (RedHat) | sudo dnf install pkg |
| Install (Debian/Ubuntu) | sudo apt install pkg |
| System update | sudo dnf update or sudo apt upgrade |
| Compress folder | tar -czf archive.tar.gz folder/ |
| Extract archive | tar -xzf archive.tar.gz |
| Download file | wget URL or curl -O URL |
| Network info | ip addr (modern) or ifconfig |
| Test connection | ping google.com |
| SSH to server | ssh user@hostname |
| System logs | journalctl -xe |
| Service control | sudo systemctl start nginx |
Frequently Asked Questions
Is Linux hard to learn?
The first week is steep if you've only used Windows or macOS GUIs. After 20-30 hours of consistent practice, most people feel comfortable with the basics. Mastery (system administration, kernel, networking) takes years, but you can be productive much sooner.
Which Linux distribution should I start with?
Ubuntu — most beginner-friendly and most widely documented. Other good first choices: Linux Mint (familiar to Windows users), Fedora (cutting-edge RedHat family), Pop!_OS (great for laptops). Skip Arch, Gentoo, and Slackware as a first distribution.
Do I need to install Linux to learn it?
No. Free options: WSL on Windows 10/11, online terminals like JSLinux or Replit, virtual machines via VirtualBox, live USB, or cloud shells like Google Cloud Shell. WSL is easiest for Windows users.
What's the difference between RedHat, Ubuntu, and other distributions?
All Linux distributions share the same Linux kernel but bundle different software, package managers, and defaults. RedHat/Fedora/CentOS use RPM packages and dnf/yum. Debian/Ubuntu/Mint use DEB packages and apt. Arch uses pacman. Core commands are identical; installation and system commands differ.
Is Linux better than Windows or macOS?
Different tools for different jobs. Linux dominates servers, cloud, and embedded. macOS leads design and content creation. Windows leads gaming and Microsoft ecosystem work. For programming and DevOps, Linux is the most valuable.
Why is Linux free?
Linux is open source — anyone can read, modify, and distribute the code. The kernel is maintained by thousands of volunteer and paid contributors. Companies like Red Hat, SUSE, and Canonical make money from support, training, and enterprise add-ons.
What jobs require Linux skills?
DevOps engineer, SRE, system administrator, cloud engineer (AWS/GCP/Azure), backend developer, security engineer, data engineer, and embedded systems developer all require Linux. Salaries for Linux-heavy roles typically run 15-30% above general developer roles.
Is RedHat Linux still relevant in 2026?
Red Hat Enterprise Linux is one of the most widely deployed enterprise Linux distributions and forms the basis for the RHCSA and RHCE certifications. Its derivatives (Rocky Linux, AlmaLinux, CentOS Stream, Fedora) make up a large share of production servers.
Start Chapter 1: Introduction to Linux →Last updated: April 25, 2026.