Linux Tutorials and Command Guides
Short, practical Linux guides. Every tutorial starts with the answer and includes copyable command examples that link to the full command reference.
How to Use the ssh Command to Connect to a Remote Server
The complete ssh syntax: connect by hostname, change ports, run remote commands and log out safely.
How to Search Files for Text with the Linux grep Command
Search files and command output with grep: case-insensitive, recursive, line numbers, whole words and counts.
How to Copy Files and Directories with the Linux cp Command
Copy files and whole folders with cp: recursive copies, preserving permissions, and avoiding overwrites.
The Linux ls Command: List Files Like a Pro
Master ls: long listings, hidden files, human-readable sizes, sorting by time and directory listings.
How to Find Files and Directories with the Linux find Command
Locate files by name, size, type and age with find, then act on the results with -exec.
How to Compress and Extract Files with tar
Create, list and extract .tar.gz archives with tar -czf, tar -tzf and tar -xzf.
Linux chmod Command: A Complete Permissions Guide
Set file permissions with chmod: the 644 and 755 octal codes, symbolic modes and how to read an ls -l line.
Linux User Management: useradd, usermod and passwd
Create users, set passwords, assign groups and lock accounts using useradd, usermod and passwd.
How to Monitor Processes with ps and top
See what is running on Linux: use ps to find PIDs and top to watch CPU and memory usage live.
How to Kill a Process in Linux with the kill Command
Stop stuck programs safely: kill by PID, escalate to kill -9, or use pkill when you only know the name.
How to Use the sed Command for Text Editing
Find-and-replace in files with sed: substitution, line ranges, deleting lines and in-place edits with -i.
awk: The Linux Text Processing Tool Explained
Pull columns and totals from any text with awk: field access, custom separators and simple calculations.
How to Install and Manage Packages with apt
Manage software on Debian and Ubuntu: apt update, apt install, apt upgrade, apt search and apt remove.
Install Software on Arch Linux with pacman
Master pacman: update with -Syu, install with -S, search with -Ss and remove with -Rns.
The Nano Text Editor: A Beginner's Guide
The friendliest terminal editor: open a file, make changes, save with Ctrl+O and exit with Ctrl+X.
VIM for Beginners: The Essential Guide
The three things new vim users must learn: modes, entering insert with i, and saving with :wq.
How to Schedule Tasks in Linux with cron
Automate anything with cron: edit jobs with crontab -e, decode the five time fields and run daily backups.
How to Reuse Commands with the bash history Feature
Stop retyping commands: repeat with !!, reuse the last argument with !$, and search with Ctrl+R.
Linux Environment Variables: How to Set and Use Them
Store settings for your shell and programs: print with echo $VAR, export them, and persist in ~/.bashrc.
How to Set Up SSH Keys for Passwordless Login
Three steps to passwordless SSH: generate a key, copy it to the server with ssh-copy-id, and log in.
How to Check Open Ports with ss and netstat
Find what is listening on your system: ss -tulpn lists every port and the process using it.
How to Check Disk Usage with df and du
See free space with df -h and the biggest folders with du -sh, then free up your disk.
How to Sync Files with rsync
Back up and mirror folders with rsync: copy with -av, mirror with --delete and sync over SSH.
Linux Redirection and Pipes: A Practical Guide
Send command output to files with > and >>, chain commands with |, capture errors with 2>, and split with tee.
tmux: A Beginner's Guide to Terminal Multiplexing
Run several terminals in one and survive disconnects: start tmux, detach with Ctrl+B D and reattach with tmux attach.
How to View Files with cat, less and more
Read files in the terminal: cat prints them, less scrolls them and more pages them.
How to Move and Rename Files with the Linux mv Command
Move files between folders and rename them with mv: the same command does both jobs.
How to Delete Files Safely with the Linux rm Command
Delete files and folders with rm and never regret it: -i to confirm, -r for directories, -f to force.
How to Create and Remove Directories with mkdir and rmdir
Make folders with mkdir, nested trees with mkdir -p, and remove empty ones with rmdir.
How to Change File Ownership with the Linux chown Command
Give files to the right user and group with chown: owner, owner:group and the recursive -R flag.
How to Run Commands as Root with sudo
Get admin power safely: run one command with sudo, keep the privilege for a while, or switch users.
How to Download Files with the Linux wget Command
Grab files from the web with wget: save with -O, resume with -c and mirror whole sites with -r.
How to Transfer Data with the Linux curl Command
Fetch pages and test APIs with curl: save output with -o, inspect headers with -I, send data with -d.
How to Sort and Deduplicate Text with sort and uniq
Order lines with sort and strip duplicates with uniq: numeric sorting, reversing and counting repeats.
How to Count and Cut Text with wc and cut
Measure text with wc (lines, words, bytes) and extract fields with cut using -d and -f.
How to View File Starts and Ends with head and tail
Look at the start of a file with head, the end with tail, and follow logs live with tail -f.
How to Create Symlinks with the Linux ln Command
Point a name at a file with ln -s: create symlinks, spot broken ones and know when a hard link fits.
How to View Directory Trees with the tree Command
See your folder structure at a glance with tree: limit depth with -L, folders only with -d, sizes with -h.
How to Compress and Extract Files with zip and unzip
Create and open .zip archives: zip to compress, unzip to extract, and zip -r for folders.
How to Mount and Unmount Filesystems with mount and umount
Attach drives with mount, detach them safely with umount, and identify devices with lsblk.
How to Manage Network Interfaces with the Linux ip Command
See and configure your network with ip: ip addr for addresses, ip link for interfaces, ip route for routing.
How to Test Network Connectivity with ping
Is that server reachable? ping host sends ICMP probes and shows reply times, loss and latency.
How to Query DNS with dig and nslookup
Find IPs, MX and TXT records with dig: get plain answers with +short and test specific record types.
How to Schedule One-Time Tasks with the at Command
Run a command later, once: pipe it into at with a time, list jobs with atq, cancel with atrm.
How to Build and Run Commands with xargs
Feed output into other commands with xargs: delete files from find, process them in batches, and substitute with -I.
How to Write Your First Bash Script
Put commands in a file, add the shebang, chmod +x it and run it: your first automation script.
How to Create Command Shortcuts with the alias Command
Make short names for long commands with alias, keep them forever in ~/.bashrc, and remove them with unalias.
How to Create Files and Update Timestamps with touch
Create empty files with touch and fix timestamps with touch -t: the two jobs of this little command.
How to Find Programs with which, whereis and locate
Find where a command lives: which gives the path, whereis adds manuals, locate searches the whole disk fast.
How to Kill Processes by Name with the Linux killall Command
Stop all copies of a program by name: killall firefox, escalate with -9, confirm with -i.