Linux Commands Reference Guide
Search, filter by categories, and quickly copy Linux commands.
No commands found
Try a different keyword or switch tabs.
📁 File & Directory Management
0 shown| Command | Description | Example |
|---|---|---|
| cat | Concatenate and display files | cat file.txt |
| cd | Change directory | cd /var/www |
| cp | Copy files and directories | cp -r source/ dest/ |
| df | Display disk space usage | df -h |
| du | Disk usage of files/directories | du -sh * |
| file | Determine file type | file unknown.dat |
| find | Search for files and directories | find / -name *.conf |
| head | Display first lines of file | head -n 20 file.txt |
| less | View file content page by page | less /var/log/syslog |
| locate | Find files by name quickly | locate passwd |
| ls | List directory contents | ls -lah |
| mkdir | Make directories | mkdir -p /path/to/dir |
| more | Display file one screen at a time | more file.txt |
| mv | Move/rename files | mv old new |
| pwd | Print working directory | pwd |
| rm | Remove files or directories | rm -rf directory/ |
| rmdir | Remove empty directories | rmdir dirname |
| tail | Display the last lines of file | tail -f /var/log/auth.log |
📝 Text Processing
0 shown| Command | Description | Example |
|---|---|---|
| fgrep | Fast grep for fixed strings | fgrep 'string' file.txt |
| grep | Search text patterns in files | grep -r 'error' /var/log/ |
| join | Join lines of two files | join file1 file2 |
| sed | Stream editor for text manipulation | sed 's/old/new/g' file.txt |
| sort | Sort lines of text files | sort -n numbers.txt |
| split | Split the file into pieces | split -l 1000 bigfile.txt |
| tr | Translate or delete characters | tr '[:lower:]' '[:upper:]' |
| uniq | Report or omit repeated lines | uniq -c sorted.txt |
| wc | Count words, lines and characters | wc -l file.txt |
🖥️ System Information & Monitoring
0 shown| Command | Description | Example |
|---|---|---|
| cal | Display calendar | cal 2024 |
| date | Display/set system date/time | date '+%Y-%m-%d %H:%M:%S' |
| dmesg | Print kernel ring buffer messages | dmesg | tail |
| free | Display memory usage | free -h |
| hostname | Show/set system hostname | hostname |
| htop | Interactive process viewer | htop |
| id | Print user and group IDs | id username |
| iostat | Report CPU and I/O statistics | iostat -x 5 |
⚙️ Process Management
0 shown| Command | Description | Example |
|---|---|---|
| bg | Put jobs in background | bg %1 |
| fg | Bring jobs to foreground | fg %1 |
| jobs | List active jobs | jobs |
| kill | Send a signal to a process | kill -9 1234 |
| killall | Kill processes by name | killall firefox |
| nice | Run with modified priority | nice -n 10 command |
| nohup | Run immune to hangups | nohup script.sh & |
| pgrep | Look up processes by name | pgrep nginx |
| pkill | Signal processes by name | pkill -u username |
| renice | Alter priority of running process | renice -5 -p 1234 |
| screen | Screen manager with terminals | screen -S session1 |
| tmux | Terminal multiplexer | tmux new -s mysession |
🌐 Network Commands
0 shown| Command | Description | Example |
|---|---|---|
| arp | Manipulate ARP cache | arp -a |
| curl | Transfer data from/to server | curl -O https://file.zip |
| dig | DNS lookup utility | dig google.com ANY |
| ftp | File transfer protocol client | ftp ftp.example.com |
| host | DNS lookup utility | host google.com |
| ifconfig | Configure network interface | ifconfig eth0 |
| ip | Show/manipulate routing, devices | ip addr show |
| iptables | IPv4 packet filtering admin | iptables -L |
| nc | Netcat – networking utility | nc -zv host 1-1000 |
| netstat | Network statistics | netstat -tulpn |
| nslookup | Query DNS servers | nslookup google.com |
| ping | Send ICMP ECHO_REQUEST | ping -c 4 google.com |
| route | Show/manipulate IP routing | route -n |
| rsync | Remote file sync | rsync -avz src/ dst/ |
| scp | Secure copy over SSH | scp file user@host:/path/ |
| ss | Socket statistics | ss -tulwn |
| ssh | Secure shell client | ssh user@192.168.1.1 |
📦 Compression & Archiving
0 shown| Command | Description | Example |
|---|---|---|
| 7z | 7-Zip archiver | 7z a archive.7z folder/ |
| bunzip2 | Decompress bzip2 files | bunzip2 file.txt.bz2 |
| bzip2 | Block-sorting file compressor | bzip2 file.txt |
| gunzip | Decompress gzip files | gunzip file.txt.gz |
| gzip | Compress files | gzip file.txt |
| rar | Create RAR archives | rar a archive.rar file |
| tar | Archive utility | tar -czvf archive.tar.gz dir/ |
| unrar | Extract RAR archives | unrar x archive.rar |
| unzip | Extract compressed files | unzip archive.zip |
| zip | Package and compress files | zip -r archive.zip folder/ |
👤 User & Group Management
0 shown| Command | Description | Example |
|---|---|---|
| groupadd | Create a new group | groupadd developers |
| groupdel | Delete group | groupdel groupname |
| groups | Show user's groups | groups username |
| passwd | Change user password | passwd username |
| su | Switch user | su - username |
| sudo | Execute as superuser | sudo command |
| useradd | Create a new user | useradd -m username |
| userdel | Delete user account | userdel -r username |
| usermod | Modify user account | usermod -aG sudo username |
| visudo | Edit the sudoers file | visudo |
💾 Disk & Filesystem Management
0 shown| Command | Description | Example |
|---|---|---|
| blkid | Locate/print block device attributes | blkid |
| dd | Convert and copy file | dd if=/dev/sda of=backup.img |
| fdisk | Partition table manipulator | fdisk -l |
| fsck | Check and repair filesystem | fsck /dev/sda1 |
| lsof | List open files | lsof -i :80 |
| mkfs | Build a Linux filesystem | mkfs.ext4 /dev/sdb1 |
| mount | Mount filesystem | mount /dev/sdb1 /mnt |
| parted | Partition manipulation program | parted /dev/sda print |
| sync | Synchronise cached writes | sync |
| umount | Unmount filesystem | umount /mnt |
⏱️ System Control & Scheduling
0 shown| Command | Description | Example |
|---|---|---|
| at | Schedule one-time tasks | at 10:00 AM |
| crontab | Schedule periodic tasks | crontab -e |
| dmesg | Print kernel messages | dmesg | grep error |
| halt | Halt the system | halt |
| journalctl | Query systemd journal | journalctl -u nginx |
| logger | Make entries in system log | logger 'Test message' |
| poweroff | Power off the system | poweroff |
| reboot | Reboot the system | reboot |
| service | Run System V init script | service apache2 restart |
| shutdown | Shutdown or restart system | shutdown -h now |
| systemctl | Control systemd services | systemctl status nginx |
🔐 Security & Penetration Testing
0 shown| Command | Description | Example |
|---|---|---|
| aircrack-ng | WiFi security auditing | aircrack-ng -w wlist capture.cap |
| gpg | Encryption and signing tool | gpg -c file.txt |
| hashcat | Advanced password recovery | hashcat -m 0 hash.txt wlist.txt |
⚠️ Security Reminders
- Always obtain proper authorization before security testing.
- Use sudo carefully — understand what commands do before running.
- Backup data before destructive commands (rm, dd).
- Test in safe environments before production use.
- Penetration testing tools are for authorized testing ONLY.