Delete directory and everything inside (dangerous!)
rmdir /s
mkdir -p path/to/dir
Create directory (and parents)
mkdir
touch file
Create empty file or update timestamp
no equivalent
cat file
Print file contents
type
head -n 20 file
Show first 20 lines
no equivalent
tail -n 20 file
Show last 20 lines
no equivalent
tail -f file
Follow file updates in real-time (logs)
no equivalent
Finding Things
Command
What It Does
Windows Equivalent
find /path -name "*.txt"
Find files by name
Search in Explorer
grep "text" file
Search inside files
findstr
grep -r "text" /path
Search recursively
findstr /s
which command
Find where a command lives
where
locate filename
Fast file search (needs sudo updatedb first)
Everything search
System Info
Command
What It Does
Windows Equivalent
uname -a
System info
systeminfo
hostname
Computer name
hostname
df -h
Disk space
no equivalent
free -h
Memory usage
Task Manager
htop
Interactive process viewer
Task Manager
lscpu
CPU info
Task Manager Details
sensors
Temperature sensors
no equivalent
uptime
How long system has been running
systeminfo | find "Boot Time"
Package Management (apt)
Command
What It Does
Windows Equivalent
sudo apt update
Refresh package list
Check for Updates
sudo apt upgrade -y
Install all updates
Windows Update
sudo apt install package
Install software
Download .exe + run
sudo apt remove package
Uninstall software
Programs & Features
sudo apt remove --purge package
Uninstall + remove config
no equivalent
sudo apt autoremove
Remove unused dependencies
no equivalent
apt search keyword
Search for packages
Microsoft Store search
dpkg -l | grep keyword
Check if package is installed
no equivalent
Permissions
Command
What It Does
Windows Equivalent
chmod +x file
Make file executable
no direct equivalent
chmod 755 file
Set full permissions
Properties > Security
chown user:group file
Change file owner
Properties > Security
sudo command
Run as administrator
“Run as administrator”
sudo -s
Open root shell
Admin CMD
Process Management
Command
What It Does
Windows Equivalent
ps aux
List all processes
Task Manager
kill PID
End a process
End Task
killall name
Kill all processes by name
no equivalent
command &
Run in background
no equivalent
jobs
List background jobs
no equivalent
Ctrl+C
Stop running command
same
Ctrl+Z
Suspend command
no equivalent
Networking
Command
What It Does
Windows Equivalent
ip addr
Show IP addresses
ipconfig
ping host
Ping
same
curl URL
Download/fetch URL
no equivalent
wget URL
Download file
no equivalent
sudo ss -tulnp
Show listening ports with process names
netstat -an
Text Editing
Command
What It Does
Windows Equivalent
nano file
Simple text editor (beginner-friendly)
notepad
vim file
Advanced text editor (steep learning curve)
no equivalent
nano basics: Arrow keys to move, Ctrl+O to save, Ctrl+X to exit.
Useful Shortcuts
Shortcut
What It Does
Tab
Auto-complete file/directory names
Up/Down arrows
Scroll through command history
Ctrl+R
Search command history
Ctrl+L
Clear screen (same as clear)
!!
Repeat last command (useful: sudo !!)
Ctrl+A
Move cursor to start of line
Ctrl+E
Move cursor to end of line
Pipes and Redirection
Syntax
What It Does
command | grep "text"
Pipe output to search
command > file
Redirect output to file (overwrite)
command >> file
Append output to file
command 2>&1
Redirect errors to same output
command1 && command2
Run command2 only if command1 succeeds
command1 || command2
Run command2 only if command1 fails
Want Structured Practice?
This cheatsheet is a reference card. For guided practice with goals, explanations, and quizzes, use the Learn Linux path. It starts with a practice folder and explains which commands need additional care:
Learn Linux — A 30-mission interactive Ubuntu terminal course you can follow at your own pace. Course exercises use ~/linux-practice; optional system-level commands have separate safety labels. Progress is saved in your browser. Covers navigation through scripting, package management, and cron — in order, without the random-command overwhelm.
Discussion
Continue the conversation about this guide. Loading comments connects to
GitHub Discussions through giscus.