ππ File and Directory Management
- ποΈ ls β List directory contents
- π΅οΈββοΈ ls -la β List all files with permissions
- π cd /path β Change directory
- π pwd β Print working directory
- π mkdir dir β Create a new directory
- ποΈ rmdir dir β Remove empty directory
- β rm file β Remove file
- π£ rm -r dir β Remove directory and its contents
- πβ‘οΈπ cp src dest β Copy file or directory
- π mv old new β Move or rename file/directory
- π find / -name file β Find file by name
ππ File Viewing and Editing
- π cat file β View file content
- π less file β Scroll through file
- π head file β Show first 10 lines
- π tail file β Show last 10 lines
- π‘ tail -f file β Monitor file in real-time
- π§βπ» nano file β Edit file in Nano editor
- π§ββοΈ vim file β Edit file in Vim editor
- π touch file β Create an empty file
- π file name β Show file type
ππ Search and Filter
- π§ grep βtextβ file β Search for text in file
- π grep -r βtextβ dir β Recursive grep in directory
- π awk β{print $1}β β Print the first column
- βοΈ cut -dβ:β -f1 file β Cut by delimiter
- π sort file β Sort file contents
- π§Ή uniq file β Remove duplicate lines
ππ§ Permissions and Ownership
- π chmod 755 file β Set file permissions
- π€ chown user file β Change file owner
- π₯ chgrp group file β Change group ownership
- π umask β Show default permission mask
π»π System Info & Monitoring
- π top β Display running processes
- ποΈ htop β Interactive process viewer (if installed)
- π§Ύ ps aux β List all processes
- π½ df -h β Show disk usage in human-readable format
- π¦ du -sh dir β Show size of a directory
- π§ free -h β Show memory usage
- β±οΈ uptime β Show system uptime
- π§ uname -a β Show kernel and system info
- π·οΈ hostname β Display system hostname
- π whoami β Show current logged-in user
ππ‘ Networking
- π‘ ip a β Show IP addresses
- π ifconfig β (Older) show IP config
- πΆ ping host β Ping a remote host
- π οΈ netstat -tuln β Show open ports (if installed)
- π ss -tuln β List sockets (faster replacement for netstat)
- π curl url β Make HTTP request
- π₯ wget url β Download from web
- π scp file user@host:/path β Copy file over SSH
- π ssh user@host β SSH into a remote host
π¦π€ Package Management
Debian/Ubuntu (APT-based)
- π apt update β Refresh package lists
- β¬οΈ apt upgrade β Upgrade all packages
- π₯ apt install pkg β Install a package
- ποΈ apt remove pkg β Remove a package
RHEL/CentOS (YUM/DNF-based)
- π₯ yum install pkg β Install a package
- ποΈ yum remove pkg β Remove a package
- π₯ dnf install pkg β (Fedora/CentOS 8+) install package
ππ§© Miscellaneous
- π°οΈ history β Show command history
- π§© alias ll=βls -laβ β Create alias
- π reboot β Reboot system
- β shutdown -h now β Shutdown immediately
- π man command β View manual for a command
