Linux Terminal Commands Cheat Sheet
File & Directory Commands:
ls — List files and directories.
cd [directory] — Change directory.
pwd — Print working directory.
mkdir [directory] — Make a new directory.
rm [file] — Remove a file.
rm -r [directory] — Remove a directory.
cp [source] [destination] — Copy files.
mv [source] [destination] — Move or rename files.
touch [file] — Create an empty file.
Viewing & Editing Files:
cat [file] — Display file contents.
less [file] — View file contents page by page.
nano [file] — Simple text editor.
vim [file] — Advanced text editor.
Permissions & Ownership:
chmod [options] [file] — Change file permissions.
chown [owner] [file] — Change file owner.
chgrp [group] [file] — Change file group.
System Information:
uname -a — Display system information.
df -h — Disk space usage.
top — Display running processes.
uptime — Show how long the system has been running.
Networking Commands:
ping [host] — Test network connection.
ifconfig — Display IP configuration.
netstat -tulnp — Network statistics.
Package Management (Debian/Ubuntu):
apt update — Refresh package lists.
apt upgrade — Upgrade installed packages.
apt install [package] — Install new package.
apt remove [package] — Remove a package.
This cheat sheet covers essential Linux commands for daily tasks.