Linux commands for beginners can feel intimidating at first - but they don't have to be. This handbook walks you through every essential command in plain English, with real examples you can run right now. No jargon, no confusion. Works on Linux, macOS, and WSL.
01 Linux Commands for Beginners: What Is Linux and Why Learn It in 2026?
Linux is a free, open-source operating system created by Linus Torvalds in 1991. It powers 90%+ of cloud servers, every Android phone, and most of the internet infrastructure you rely on daily.
90%+ of cloud servers run Linux. AWS, GCP, Azure — all Linux underneath. If you work in tech, you’ll encounter it daily.
Android is Linux. The world’s most-used mobile OS runs on a Linux kernel.
It’s completely free. No license fees, ever. Run it on hardware you already own.
Massive career demand. DevOps, cloud engineering, and cybersecurity all require Linux skills.
Mac users: your Terminal already runs UNIX commands — the same ones in this guide. Windows users: install WSL (free, built into Windows 10/11) and follow along right now.
Who Is This Guide For?
02 What Is a Shell?
The shell is a program that reads your text commands and tells the OS what to do. The most common shell is Bash. When you open a terminal, you’re talking to the shell.
Ubuntu/Debian: Ctrl+Alt+T · macOS: Spotlight → "Terminal" · Windows: Install WSL
username@hostname:~/Documents$ ← type your commands here
The $ symbol means the shell is ready. You don’t type it — it’s already there.
Navigation
Print Working Directory — shows exactly where you are in the filesystem. Your compass when lost.
$ pwd /home/sarah/Documents
Navigation
List — shows the contents of a directory.
$ ls # list current folder $ ls -l # detailed list with permissions $ ls -a # show hidden files (dotfiles) $ ls -la # detailed + hidden (most used combo)
ls -la is what most experienced developers type every single day.
Navigation
Change Directory — moves you into a different folder.
$ cd Documents # enter the Documents folder $ cd .. # go UP one level $ cd ~ # go to your home directory $ cd / # go to root of filesystem $ cd - # go back to previous directory
Help
Manual — opens the built-in documentation for any command. Press Q to quit.
$ man ls # read the full manual for ls $ man grep
Files
Make Directory — creates a new folder.
$ mkdir projects $ mkdir -p work/2026/jan # create nested folders at once
Files
Touch — creates an empty file instantly.
$ touch notes.txt $ touch a.txt b.txt c.txt # multiple files at once
Files
Copy — copies files or entire folders.
$ cp file.txt backup.txt $ cp -r myfolder/ backup/ # -r for directories
Files
Move / Rename — moves a file to a new location, or renames it.
$ mv old.txt new.txt # rename $ mv file.txt ~/Documents/ # move to folder
Files
Remove — deletes files permanently. There is no Recycle Bin. Gone means gone.
$ rm file.txt $ rm -r myfolder # delete folder and its contents
Never run rm -rf / — it destroys your entire operating system with no recovery.
Files
Find — search for files by name, type, size, or date.
$ find . -name "*.log" $ find . -size +10M # files larger than 10MB $ find . -mtime -1 # modified in last 24 hours
Text
Cat — prints an entire file to the screen.
$ cat notes.txt $ cat -n notes.txt # with line numbers
Text
Less — scrollable file viewer. Best for large files. Press Q to quit.
$ less bigfile.txt # Arrow keys to scroll · / to search · Q to quit — see also: I/O Redirection guide
Text
Tail — shows the last lines of a file. Use -f to follow a live log in real time.
$ tail -n 20 file.txt $ tail -f /var/log/syslog # watch live log updates
Search
Grep — searches for patterns inside files. One of the most-used commands in existence.
$ grep "error" logfile.txt $ grep -i "error" file.txt # case-insensitive $ grep -r "TODO" ~/projects/ # search recursively $ ls -la | grep ".txt" # combine with pipe
Text Tools
$ echo "hello world" # print text to screen $ echo "text" > file.txt # write text to a file $ sort names.txt # sort lines alphabetically $ wc -l file.txt # count lines in a file $ diff old.txt new.txt # compare two files
Every file has three permission types for three groups. Run ls -la to see them: -rwxr-xr--
Permissions
Change Mode — set who can read, write, or execute a file. See also: User Management Cheat Sheet.
$ chmod +x script.sh # make executable $ chmod 755 script.sh # rwxr-xr-x (standard script) $ chmod 644 file.txt # rw-r--r-- (standard file) $ chmod 600 secret.key # rw------- (owner only)
4=Read, 2=Write, 1=Execute. Add them: 7=rwx, 6=rw-, 5=r-x, 4=r--. Three digits = Owner / Group / Others.
Permissions
$ chown sarah:devs file.txt $ chown -R sarah ~/projects/ # recursive (whole folder)
Superuser
Superuser Do — run a command as root (system administrator). Also see our Linux Security Cheat Sheet. Learn how to configure sudo.
$ sudo apt update # Package Management guide $ sudo apt install nginx
Sudo gives full system access. Always understand what a command does before running it as root.
System
$ ps aux # list all running processes $ ps aux | grep nginx # find specific process $ top # live monitor (press Q to quit) — learn more about top
System
$ kill 1234 # graceful stop (process ID) $ kill -9 1234 # force kill immediately $ killall firefox # kill by name
Automation
Cron — schedule commands to run automatically at set times.
$ crontab -e # Format: minute hour day month weekday command 0 2 * * * /home/sarah/backup.sh # run every day at 2 AM
Archive
$ gzip -k bigfile.txt # compress and keep original $ gunzip bigfile.txt.gz # decompress
Archive
Tar — bundle multiple files and compress them. The standard archive format on Linux servers.
$ tar -czf archive.tar.gz folder/ # CREATE compressed archive $ tar -xzf archive.tar.gz # EXTRACT archive $ tar -tzf archive.tar.gz # LIST contents without extracting
-czf = Compress Ze Files · -xzf = eXtract Ze Files
Network
$ ping -c 4 google.com # test if host is reachable
Network
$ curl -O https://example.com/file.zip $ curl https://api.example.com/data # test an API $ wget https://example.com/file.zip
Network
Secure Shell — connect to a remote Linux server securely. See our SSH commands guide.
$ ssh username@192.168.1.10 $ ssh -i ~/.ssh/key.pem user@server.com
System
$ whoami # show current username $ uname -a # kernel and OS version $ df -h # disk space usage $ du -sh ~/Documents # size of a specific folder — du guide $ free -h # RAM and swap usage
Productivity
$ history # show all past commands $ !! # re-run the last command $ alias ll='ls -la' # create a shortcut # Add alias to ~/.bashrc to make it permanent
Editors
$ nano file.txt # beginner-friendly editor # Ctrl+O to save · Ctrl+X to exit $ vim file.txt # powerful editor # i=insert mode · Esc · :wq=save and quit
11 Productivity: Pipes & Keyboard Shortcuts
Power Feature
The pipe | sends the output of one command as input to the next. This is one of the most powerful concepts in Linux. Ready to go further? See our Linux Shell Scripting Cheat Sheet.
$ ls | grep ".txt" | wc -l # count .txt files $ cat log.txt | grep "error" | tail -20 $ du -sh * | sort -rh | head -10 # 10 largest items
Power Feature
Tab → auto-complete file names and commands
↑ / ↓ → scroll through command history
Ctrl + C → cancel the current running command
Ctrl + L → clear the terminal screen
Ctrl + R → search through command history
Ctrl + A → jump to the start of the line
Ctrl + E → jump to the end of the line
12 Complete Linux Command Cheat Sheet 2026
Bookmark this. Every essential Linux command in one quick-reference table.
Linux Commands — Quick Reference 2026
FAQ Frequently Asked Questions
Ubuntu 24.04 LTS for most people. Linux Mint if you’re coming from Windows — it feels most familiar. See also: RHEL vs Ubuntu.
No. Start with just 7: ls, cd, pwd, mkdir, rm, cp, grep. The rest comes naturally with daily use.
Most people feel comfortable after 2–4 weeks of daily use. The key is opening a real terminal and practicing — not just reading. See also: Linux Quick Start Guide 2026: Up and Running in 30 Minutes
Three great options: WSL on Windows 10/11 (free, built-in), Killercoda.com (browser-based Linux labs), or a free $5/month cloud server on DigitalOcean.
"Superuser do" — it runs the command as root (the system administrator). Use it for installing software. Never run a sudo command you don’t fully understand. Also explore our SuperUserDo.
✓ You’ve Got This
The command line feels overwhelming for exactly one week — then it clicks. Open a terminal today. Run ls, cd, and pwd until they feel natural. Add one new command per day. In a month you’ll be surprised at how capable you’ve become.
For even deeper learning, check our LinuxTeck. A Complete Learning Blog is an excellent next step. Happy hacking. 🐧 .