| Command | Detail | Example |
|---|
| ls | List files and directories | ls -la |
| tree | Directory structure | tree /home/user |
| pwd | Current directory | pwd |
| cd | Change directory | cd Documents |
| touch | Create file | touch file.txt |
| mkdir | Create directory | mkdir projects |
| rmdir | Remove empty dir | rmdir old_folder |
| cp | Copy files | cp a.txt b.txt |
| mv | Move / rename | mv old.txt new.txt |
| rm | Delete files | rm file.txt |
| stat | File details | stat file.txt |
| file | Detect file type | file image.png |
| du | Disk usage | du -sh folder/ |
| df | Disk free | df -h |
| realpath | Absolute path | realpath file.txt |
File Permissions
| Command | Detail | Example |
|---|
| chmod | Change permissions | chmod 755 script.sh |
| chown | Change owner | chown user:file.txt |
| chgrp | Change group | chgrp developers file.txt |
| getfacl | View ACL permissions | getfacl file.txt |
| setfacl | Set ACL permissions | setfacl -m u:john:rwx file.txt |
| umask | Default permission settings | umask 022 |
| ls -l | View permissions in long format | ls -l |
| id | Show user & group IDs | id username |
| groups | Show user groups | groups username |
| stat | Detailed file permission info | stat file.txt |
| install | Copy file with ownership & perms | install -m 755 app.sh /usr/bin/ |
| setcap | Set Linux capabilities | setcap cap_net_bind_service=+ep app |
| getcap | View file capabilities | getcap app |
| su | Switch user | su root |
| sudo | Execute as superuser | sudo rm file.txt |
Viewing and Editing Files
| Command | Detail | Example |
|---|
| cat | View file | cat file.txt |
| less | Paginated view | less log.txt |
| more | Basic view | more file.txt |
| head | First lines | head -n 10 file.txt |
| tail | Last lines | tail -n 20 file.txt |
| watch | Auto refresh command output | watch -n 1 ls |
| nano | CLI text editor | nano notes.txt |
| vim | Advanced CLI editor | vim config.conf |
| vi | Classic Unix editor | vi file.txt |
| tac | View file in reverse order | tac file.txt |
| nl | View file with line numbers | nl file.txt |
| wc | Count lines, words, characters | wc -l file.txt |
| sort | Sort file content | sort names.txt |
| uniq | Remove duplicate lines | uniq data.txt |
| cut | Extract columns from file | cut -d: -f1 /etc/passwd |
| paste | Merge lines from files | paste a.txt b.txt |
| column | Format output into columns | column -t file.txt |
| strings | Extract readable strings | strings binaryfile |
Text Processing
| Command | Detail | Example |
|---|
| grep | Pattern search | grep "error" log.txt |
| egrep | Extended regex grep | egrep "error \ |
| fgrep | Fixed string grep | fgrep "ERROR[1]" log.txt |
| awk | Advanced text processing | awk '{print $1}' file.txt |
| sed | Stream editor | sed 's/foo/bar/g' file.txt |
| cut | Column cut | cut -d: -f1 /etc/passwd |
| sort | Sort output | sort -u names.txt |
| uniq | Remove duplicates | uniq -c data.txt |
| wc | Word/line/char count | wc -l file.txt |
| tr | Translate/delete characters | tr 'a-z' 'A-Z' < file.txt |
| xargs | Build args from stdin | cat files.txt \ |
| column | Align output in columns | column -t data.txt |
| paste | Merge lines from files | paste a.txt b.txt |
| nl | Number lines | nl file.txt |
| join | Join files on field | join a.txt b.txt |
| fold | Line wrap text | fold -w 50 file.txt |
| rev | Reverse lines | rev file.txt |
| pr | Pretty print text | pr file.txt |
System Information
| Command | Detail | Example |
|---|
| uname | Kernel / OS info | uname -a |
| hostnamectl | Host & OS details | hostnamectl |
| uptime | System running time | uptime |
| htop | Interactive process monitor | htop |
| top | Process view | top |
| ps | Process status | ps aux |
| free | RAM usage | free -h |
| vmstat | Memory & CPU stats | vmstat 1 |
| iostat | Disk I/O stats | iostat |
| lsblk | Block devices | lsblk -f |
| blkid | Block device UUIDs | blkid |
| mount | Mount disk | mount /dev/sdb1 /mnt |
| umount | Unmount disk | umount /mnt |
| df | Disk free | df -h |
| du | Disk usage | du -sh /var/log |
| watch | Auto-refresh command output | watch free -h |
| dmesg | Kernel messages | dmesg \ |
| uptime | Load average | uptime |
| whoami | Current user | whoami |
| arch | System architecture | arch |
| lscpu | CPU information | lscpu |
| lsmem | Memory info | lsmem |
Process Management
| Command | Detail | Example |
|---|
| ps | Process list | ps aux |
| kill | Kill process by PID | kill -9 1234 |
| killall | Kill process by name | killall firefox |
| pkill | Kill by pattern | pkill -f python |
| bg | Resume job in background | bg %1 |
| fg | Bring job to foreground | fg %1 |
| jobs | List background jobs | jobs -l |
| nice | Start process with priority | nice -n 10 python app.py |
| renice | Change running process priority | renice -5 -p 1234 |
| top | Real-time process viewer | top |
| htop | Interactive process viewer | htop |
| watch | Re-run command repeatedly | watch ps aux |
| strace | System call tracing | strace ls |
| ltrace | Library call tracing | ltrace curl example.com |
| time | Measure execution time | time ./script.sh |
| uptime | Load average info | uptime |
| tload | Terminal load monitor | tload |
| htop -p | Monitor specific PID | htop -p 1234 |
| pstree | Process tree view | pstree -p |
Networking
| Command | Detail | Example |
|---|
| ip | Network configuration | ip a |
| ifconfig | Legacy interface tool | ifconfig eth0 |
| iwconfig | Wireless configuration | iwconfig wlan0 |
| nmcli | NetworkManager CLI | nmcli dev status |
| ping | ICMP connectivity test | ping google.com |
| traceroute | Route tracing | traceroute google.com |
| tracepath | Lightweight route trace | tracepath google.com |
| netstat | Network statistics (legacy) | netstat -tulnp |
| ss | Socket statistics (modern) | ss -tulnp |
| arp | ARP table | arp -a |
| ip neigh | Neighbor/ARP table | ip neigh |
| route | Legacy routing table | route -n |
| ip route | Modern routing table | ip route show |
| mtr | Ping + traceroute combo | mtr google.com |
| nmap | Network scanning | nmap -sV 192.168.1.1 |
| tcpdump | Packet capture | tcpdump -i eth0 |
| tshark | CLI Wireshark | tshark -i eth0 |
| curl | HTTP/network client | curl -I https://example.com |
| wget | Download over network | wget https://example.com/file.zip |
| nc / netcat | Network debugging tool | nc -lvnp 4444 |
| whois | Domain/IP info | whois example.com |
| dig | DNS lookup | dig example.com |
| nslookup | DNS query | nslookup example.com |
DNS Tools
| Command | Detail | Example |
|---|
| dig | DNS lookup | dig example.com |
| nslookup | DNS query | nslookup example.com |
| whois | Domain registration info | whois example.com |
| curl | HTTP/HTTPS requests | curl -I https://example.com |
| wget | Download files | wget https://example.com/file.zip |
| ftp | FTP client | ftp ftp.example.com |
| sftp | Secure FTP over SSH | sftp user@server |
| scp | Secure copy over SSH | scp file.txt user@server:/tmp/ |
| rsync | Efficient file sync | rsync -avz dir/ user@server:/backup/ |
| ssh | Secure remote login | ssh user@server |
| telnet | Plain TCP client (legacy) | telnet example.com 80 |
| nc | Netcat – read/write network | nc -vz example.com 443 |
| httpie | User-friendly HTTP client | http GET https://example.com |
| aria2c | Advanced downloader | aria2c https://example.com/file.iso |
| lynx | CLI web browser | lynx https://example.com |
| openssl | TLS / cert inspection | openssl s_client -connect example.com:443 |
| timeout | Limit command execution time | timeout 5 curl example.com |
Package Management
| Command | Detail | Example |
|---|
| apt | Debian package manager | apt update |
| apt-get | Install/remove packages | apt-get install nginx |
| apt-cache | Search & inspect packages | apt-cache search python3 |
| apt-key | Manage APT keys (legacy) | apt-key list |
| dpkg | Manage .deb packages | dpkg -i app.deb |
| dpkg-query | Query installed packages | dpkg-query -l |
| add-apt-repository | Add PPA repositories | add-apt-repository ppa:deadsnakes/ppa |
| snap | Snap package manager | snap install code |
| snapctl | Control snap services | snapctl services |
| flatpak | Flatpak package manager | flatpak install flathub org.gimp.GIMP |
| pip | Python package installer | pip install requests |
| pip3 | Python3 package installer | pip3 install flask |
| pipx | Install Python CLI tools safely | pipx install httpie |
| gem | Ruby package manager | gem install bundler |
| npm | Node.js package manager | npm install express |
| npx | Run npm packages without install | npx create-react-app app |
| yarn | Alternative Node package manager | yarn add react |
| brew | macOS/Linuxbrew package manager | brew install wget |
| conda | Python data-science packages | conda install numpy |
User Management
| Command | Detail | Example |
|---|
| useradd | Add new user | useradd alice |
| usermod | Modify user account | usermod -aG sudo alice |
| userdel | Delete user | userdel -r alice |
| passwd | Change user password | passwd alice |
| su | Switch user | su - root |
| sudo | Execute as superuser | sudo apt update |
| login | Login to system | login alice |
| logout | Logout from session | logout |
| exit | Exit shell/session | exit |
| groups | Show user groups | groups alice |
| id | Show user & group IDs | id alice |
| groupadd | Add group | groupadd developers |
| groupmod | Modify group | groupmod -n dev developers |
| groupdel | Delete group | groupdel developers |
| newgrp | Switch primary group | newgrp developers |
| whoami | Current user | whoami |
| who | Logged-in users | who |
| w | User activity & load | w |
| last | Login history | last |
| lastlog | Last login per user | lastlog |
| faillog | Failed login attempts | faillog -a |
Security & Penetration Testing
| Command / Tool | Detail | Example |
|---|
| nmap | Network & port scanner | nmap -sV -p- target.com |
| masscan | Ultra-fast port scanner | masscan target.com -p1-65535 --rate 1e5 |
| netdiscover | LAN host discovery | netdiscover -r 192.168.1.0/24 |
| amass | Subdomain enumeration | amass enum -d example.com |
| subfinder | Passive subdomain discovery | subfinder -d example.com |
| dnsenum | DNS enumeration | dnsenum example.com |
| whatweb | Web technology fingerprinting | whatweb https://example.com |
| theHarvester | OSINT (emails, hosts) | theHarvester -d example.com -b all |
| httpx | HTTP probing & tech detection | httpx -l subs.txt -title -status-code |
| naabu | Fast port discovery | naabu -host example.com |
| assetfinder | Find related domains | assetfinder example.com |
| waybackurls | Archived URLs (Wayback) | waybackurls example.com |
| gau | Get all URLs (GAU) | gau example.com |
| hakrawler | Crawl URLs | hakrawler -u https://example.com |
| ffuf | Fuzzing (dirs, params) | ffuf -u https://site/FUZZ -w wordlist |
| dirsearch | Directory brute-force | dirsearch -u https://example.com |
| nikto | Web server scanner | nikto -h https://example.com |
| wafw00f | WAF detection | wafw00f https://example.com |
| sslscan | SSL/TLS analysis | sslscan example.com |
Web Application Testing
| Command / Tool | Detail | Example |
|---|
| nikto | Web vulnerability scanner | nikto -h https://example.com |
| sqlmap | SQL injection testing | sqlmap -u "http://site/page?id=1" |
| wpscan | WordPress security scanner | wpscan --url https://site.com |
| msfconsole | Metasploit framework | msfconsole |
| searchsploit | Exploit-DB search | searchsploit apache 2.4 |
| hydra | Online brute-force attacks | hydra -l admin -P pass.txt ssh://target |
| medusa | Parallel auth brute-forcer | medusa -h target -u admin -P pass.txt -M ssh |
| crackmapexec | Active Directory attacks | crackmapexec smb 10.0.0.0/24 |
| nuclei | Template-based vuln scanner | nuclei -u https://example.com |
| burpsuite | Web proxy & testing | burpsuite |
| zaproxy (ZAP) | OWASP web scanner | zaproxy |
| john | Password cracker | john hashes.txt |
| hashcat | GPU password cracking | hashcat -m 0 hashes.txt wordlist.txt |
| enum4linux | SMB enumeration | enum4linux target |
| rpcclient | RPC enumeration | rpcclient -U "" target |
| responder | LLMNR/NBT-NS poisoning | responder -I eth0 |
| evil-winrm | WinRM shell | evil-winrm -i target -u user -p pass |
| impacket-* | AD & network attack scripts | impacket-smbclient user@target |
| xsser | XSS testing | xsser -u https://site.com |
Wireless Attacks
| Command / Tool | Detail | Example (generic) |
|---|
| airmon-ng | Enable monitor mode | airmon-ng start wlan0 |
| airodump-ng | Capture wireless packets | airodump-ng wlan0mon |
| aireplay-ng | Injection / deauth testing | aireplay-ng --test wlan0mon |
| aircrack-ng | Crack captured handshakes | aircrack-ng capture.cap |
| iw | Modern wireless configuration | iw dev |
| iwconfig | Legacy wireless config | iwconfig |
| wash | WPS detection & scan | wash -i wlan0mon |
| reaver | WPS PIN attack (legacy) | reaver -i wlan0mon |
| bettercap | MITM & network framework | bettercap -iface wlan0 |
| hcxdumptool | Capture WPA handshakes/PMKID | hcxdumptool -i wlan0mon |
| hcxpcapngtool | Convert captures for cracking | hcxpcapngtool capture.pcapng |
| kismet | Wireless sniffer & IDS | kismet |
| mdk4 | Stress & testing tool | mdk4 wlan0mon |
| wifite | Automated Wi-Fi auditing | wifite |
| macchanger | Change MAC address | macchanger -r wlan0 |
| rfkill | Enable/disable wireless radios | rfkill list |
| nmcli | NetworkManager (Wi-Fi control) | nmcli dev wifi list |
Cryptography & Hashing
| Command / Tool | Detail | Example |
|---|
| hashcat | Advanced hash cracking | hashcat -m 0 hashes.txt wordlist.txt |
| john | Password cracker | john hashes.txt |
| openssl | Cryptography & SSL toolkit | openssl enc -aes-256-cbc -in a.txt |
| gpg | File & email encryption | gpg -c secret.txt |
| base64 | Encode / decode data | base64 file.txt |
| md5sum | MD5 hash | md5sum file.txt |
| sha1sum | SHA-1 hash | sha1sum file.txt |
| sha256sum | SHA-256 hash | sha256sum file.txt |
| sha512sum | SHA-512 hash | sha512sum file.txt |
| bcrypt | Password hashing (strong) | htpasswd -nbB user pass |
| argon2 | Modern password hashing | argon2 pass -id -t 3 -m 16 |
| htpasswd | Create password hashes | htpasswd -n user |
| zip | Password-protect archives | zip -e secure.zip file.txt |
| 7z | Encrypted archives | 7z a secure.7z file.txt |
| xxd | Hex dump / reverse | xxd file.bin |
| strings | Extract readable strings | strings binary |
| file | Detect file type | file hash.txt |
Binary Analysis & Reverse Engineering
| Command / Tool | Detail | Example |
|---|
| strings | Extract readable text | strings binary.exe |
| binwalk | Firmware & file analysis | binwalk firmware.bin |
| objdump | Disassemble / inspect binaries | objdump -d program |
| readelf | ELF binary analysis | readelf -h binary |
| hexdump | Hexadecimal view | hexdump -C file.bin |
| xxd | Hex view & reverse | xxd file.bin |
| volatility | Memory forensics framework | volatility -f mem.raw imageinfo |
| file | Detect file type | file unknown.bin |
| stat | File metadata | stat file.bin |
| nm | List symbols in binary | nm program |
| ldd | Shared library dependencies | ldd program |
| strace | System call trace | strace ./program |
| ltrace | Library call trace | ltrace ./program |
| foremost | File carving | foremost image.dd |
| scalpel | Advanced file carving | scalpel disk.img |
| exiftool | Metadata extraction | exiftool image.jpg |
| pdfinfo | PDF metadata | pdfinfo file.pdf |
| radare2 | Reverse engineering framework | radare2 binary |
| ghidra | GUI reverse engineering suite | ghidraRun |
Logging & Monitoring
| Command | Detail | Example |
|---|
| journalctl | systemd system logs | journalctl -xe |
| dmesg | Kernel ring buffer logs | dmesg \ |
| last | Login history | last |
| lastlog | Last login per user | lastlog |
| who | Currently logged-in users | who |
| w | User activity & load | w |
| whoami | Current user | whoami |
| faillog | Failed login attempts | faillog -a |
| journalctl -u | Logs of specific service | journalctl -u ssh |
| journalctl -f | Follow logs (live) | journalctl -f |
| tail | View end of log file | tail -f /var/log/syslog |
| less | Paginated log viewing | less /var/log/auth.log |
| grep | Search inside logs | grep "error" /var/log/syslog |
| ausearch | Search audit logs | ausearch -m USER_LOGIN |
| auditctl | Configure audit rules | auditctl -l |
| aureport | Audit summary reports | aureport -au |
| logrotate | Rotate & manage logs | logrotate -f /etc/logrotate.conf |
| service | Check service status (legacy) | service ssh status |
| systemctl | Manage & inspect services | systemctl status ssh |
| uptime | System load & running time | uptime |
| ps | Process snapshot | ps aux \ |
| top | Live process & resource monitor | top |
| htop | Interactive monitoring | htop |
Scheduling & Job Management
| Command | Detail | Example |
|---|
| cron | Background job scheduler service | systemctl status cron |
| crontab | User cron configuration | crontab -e |
| crontab -l | List cron jobs | crontab -l |
| at | Schedule one-time job | echo "backup.sh" \ |
| atq | List scheduled at jobs | atq |
| atrm | Remove at job | atrm 2 |
| watch | Repeat command output | watch -n 2 df -h |
| timeout | Limit command execution time | timeout 10 ping google.com |
| sleep | Delay execution | sleep 5 |
| batch | Run job when system load is low | echo "script.sh" \ |
| systemctl | Manage cron & timer services | systemctl list-timers |
| systemd-run | Run command as systemd unit | systemd-run --on-active=5m backup.sh |
| anacron | Run missed cron jobs | anacron -T |
| fcron | Advanced cron alternative | fcrontab -e |
| nohup | Run job immune to hangup | nohup longtask.sh & |
| bg | Resume job in background | bg %1 |
| fg | Resume job in foreground | fg %1 |
| jobs | List background jobs | jobs |
Development & Programming
| Command | Detail | Example |
|---|
| gcc | Compile C programs | gcc main.c -o app |
| g++ | Compile C++ programs | g++ main.cpp -o app |
| make | Build automation tool | make |
| cmake | Cross-platform build system | cmake . && make |
| ldd | Show shared library dependencies | ldd app |
| objdump | Disassemble / inspect binaries | objdump -d app |
| readelf | ELF binary analysis | readelf -a app |
| strace | System call debugging | strace ./app |
| ltrace | Library call debugging | ltrace ./app |
| gdb | GNU debugger | gdb ./app |
| valgrind | Memory leak detection | valgrind ./app |
| python3 | Python interpreter | python3 script.py |
| pip3 | Python package manager | pip3 install flask |
| venv | Python virtual environment | python3 -m venv venv |
| node | JavaScript runtime | node app.js |
| npm | Node.js package manager | npm install express |
| npx | Run Node tools without install | npx vite |
| java | Run Java programs | java Main |
| javac | Compile Java source | javac Main.java |
| mvn | Maven build tool | mvn package |
| gradle | Gradle build system | gradle build |
| go | Go language toolchain | go run main.go |
| rustc | Rust compiler | rustc main.rs |
| cargo | Rust package manager | cargo build |
| php | PHP interpreter | php index.php |
Miscellaneous Tools
| Command | Detail | Example |
|---|
| history | Command history | history \ |
| clear | Clear terminal screen | clear |
| reset | Reset terminal / tty | reset |
| script | Record terminal session | script session.log |
| scriptreplay | Replay recorded session | scriptreplay session.log |
| screen | Terminal multiplexer | screen -S mysession |
| tmux | Advanced terminal multiplexer | tmux new -s mysession |
| tmux attach | Attach to existing session | tmux attach -t mysession |
| proxychains | Route traffic through proxy | proxychains curl https://example.com |
| torsocks | Route app through Tor | torsocks curl https://example.com |
| tor | Tor daemon / network | systemctl start tor |
| wget | Download via CLI | wget https://example.com/file |
| curl | HTTP requests via CLI | curl -I https://example.com |
| nc / netcat | TCP/UDP connectivity | nc -lvnp 4444 |
| ssh | Secure remote login | ssh user@host |
| scp | Secure copy over SSH | scp file user@host:/path/ |
| rsync | Sync files | rsync -avz src/ user@host:/backup/ |
| dig | DNS lookup | dig example.com |
| nslookup | DNS query | nslookup example.com |
| whoami | Current user | whoami |