File and Directory Operations
-
ls– List directory contents -
cd– Change directory -
pwd– Print working directory -
cp– Copy files or directories -
mv– Move or rename files or directories -
rm– Remove files or directories -
mkdir– Make directories -
rmdir– Remove empty directories -
find– Search for files in a directory hierarchy -
locate– Find files by name (uses a database)
📄 File Viewing and Editing
-
cat– View file contents -
less– View file one page at a time -
more– View file page-by-page -
head– View the first few lines of a file -
tail– View the last few lines of a file -
nano– Simple text editor -
vim– Advanced text editor -
touch– Create an empty file or update timestamp
🔍 System Monitoring and Performance
-
top– Real-time system monitoring -
htop– Interactive process viewer (better thantop) -
ps– Show running processes -
free– Show memory usage -
df– Show disk space usage -
du– Estimate file space usage -
uptime– Show how long the system has been running -
who– Show who is logged in
⚙️ Package Management (varies by distro)
-
apt– Debian-based package manager (apt install,apt update) -
yum/dnf– RedHat-based package managers -
pacman– Arch Linux package manager
🔐 Permissions and Ownership
-
chmod– Change file permissions -
chown– Change file owner or group -
umask– Set default permissions
🌐 Networking
-
ping– Check connectivity -
curl– Transfer data from URLs -
wget– Download files from the internet -
netstat– Display network connections (deprecated) -
ss– Display sockets (replacement fornetstat) -
ifconfig/ip– Show or configure network interfaces -
nmap– Network scanner
📦 Archiving and Compression
-
tar– Archive files -
gzip/gunzip– Compress or decompress files -
zip/unzip– Archive and compress files
🧠 Process and Job Control
-
kill– Send signal to process -
killall– Kill processes by name -
bg/fg– Background and foreground jobs -
jobs– List active jobs -
nice/renice– Set process priority
🛠️ Miscellaneous
-
alias– Create shortcuts for commands -
history– Show command history -
man– View manual pages for commands (man ls, etc.)