Top 100 Linux Commands Engineers Use Daily
This page focuses on commands that are practical in real backend, DevOps, CI/CD, support and scripting work. The descriptions are short for fast lookup.
Command Reference
| # | Command | Brief Description | Example |
|---|---|---|---|
| 1 | pwd | Print current directory | pwd |
| 2 | ls | List files | ls -lah |
| 3 | cd | Change directory | cd /opt/apps |
| 4 | mkdir | Create directory | mkdir -p /opt/app/config |
| 5 | touch | Create empty file | touch app.log |
| 6 | cp | Copy files | cp app.jar /opt/apps/ |
| 7 | mv | Move or rename | mv old.log archive.log |
| 8 | rm | Remove files | rm -rf temp/ |
| 9 | rmdir | Remove empty directory | rmdir olddir |
| 10 | tree | Show directory tree | tree -L 2 |
| 11 | find | Find files | find /opt -name '*.jar' |
| 12 | locate | Fast indexed file search | locate application.yml |
| 13 | which | Locate executable | which java |
| 14 | whereis | Locate binary/source/man pages | whereis docker |
| 15 | stat | File metadata | stat app.log |
| 16 | du | Directory size | du -sh /var/log |
| 17 | df | Disk usage | df -h |
| 18 | file | Identify file type | file app.jar |
| 19 | basename | Strip path | basename /opt/apps/app.jar |
| 20 | dirname | Get directory part | dirname /opt/apps/app.jar |
| 21 | cat | Print file contents | cat app.log |
| 22 | less | View large files | less app.log |
| 23 | head | Show first lines | head -20 app.log |
| 24 | tail | Show last lines | tail -f app.log |
| 25 | wc | Count lines/words/bytes | wc -l app.log |
| 26 | sort | Sort lines | sort users.txt |
| 27 | uniq | Remove duplicates or count | sort users.txt | uniq -c |
| 28 | cut | Extract columns | cut -d, -f1 users.csv |
| 29 | paste | Merge lines/columns | paste a.txt b.txt |
| 30 | tr | Translate/delete characters | tr '[:lower:]' '[:upper:]' |
| 31 | grep | Search text | grep -n ERROR app.log |
| 32 | egrep | Extended grep | egrep 'ERROR|WARN' app.log |
| 33 | fgrep | Fixed string grep | fgrep 'NullPointerException' app.log |
| 34 | awk | Pattern scanning and reporting | awk '{print $1,$4}' access.log |
| 35 | sed | Stream editing | sed 's/localhost/127.0.0.1/g' config.yml |
| 36 | xargs | Build commands from input | find . -name '*.log' | xargs grep ERROR |
| 37 | tee | Write output to file and screen | java -jar app.jar | tee run.log |
| 38 | split | Split large files | split -l 50000 big.log chunk_ |
| 39 | diff | Compare files | diff a.txt b.txt |
| 40 | cmp | Byte-level compare | cmp file1 file2 |
| 41 | comm | Compare sorted files | comm list1 list2 |
| 42 | tar | Archive files | tar -czvf backup.tar.gz /opt/apps |
| 43 | gzip | Compress file | gzip app.log |
| 44 | gunzip | Uncompress gz file | gunzip app.log.gz |
| 45 | zip | Create zip archive | zip -r app.zip app/ |
| 46 | unzip | Extract zip archive | unzip app.zip |
| 47 | ps | List processes | ps aux | grep java |
| 48 | pgrep | Find process by name | pgrep -af spring |
| 49 | pkill | Kill by name | pkill -f spring |
| 50 | kill | Terminate process | kill -15 1234 |
| 51 | killall | Kill all matching processes | killall java |
| 52 | top | Interactive process monitor | top |
| 53 | htop | Improved process monitor | htop |
| 54 | nice | Start with priority | nice -n 10 java -jar app.jar |
| 55 | renice | Change process priority | renice 5 -p 1234 |
| 56 | free | Memory usage | free -h |
| 57 | uptime | Load and uptime | uptime |
| 58 | vmstat | System performance snapshot | vmstat 1 5 |
| 59 | iostat | CPU and disk IO | iostat -xz 1 3 |
| 60 | mpstat | CPU per core | mpstat -P ALL 1 3 |
| 61 | lsof | Open files and sockets | lsof -i :8080 |
| 62 | ss | Socket statistics | ss -tulnp |
| 63 | netstat | Network stats (legacy but still common) | netstat -tulnp |
| 64 | ip | IP and route management | ip addr |
| 65 | ping | Connectivity test | ping -c 4 google.com |
| 66 | traceroute | Network path | traceroute github.com |
| 67 | nslookup | DNS query | nslookup example.com |
| 68 | dig | Advanced DNS query | dig example.com |
| 69 | curl | HTTP/API calls | curl http://localhost:8080/actuator/health |
| 70 | wget | Download file | wget https://repo1.maven.org/... |
| 71 | ssh | Remote login | ssh user@server |
| 72 | scp | Secure copy | scp app.jar user@server:/opt/apps |
| 73 | rsync | Fast sync | rsync -avz logs/ user@server:/backup/logs |
| 74 | sftp | Interactive file transfer | sftp user@server |
| 75 | chmod | Change permissions | chmod +x deploy.sh |
| 76 | chown | Change owner | chown app:app logs/ |
| 77 | chgrp | Change group | chgrp devops deploy.sh |
| 78 | umask | Default permission mask | umask 022 |
| 79 | sudo | Run as elevated user | sudo systemctl restart app |
| 80 | su | Switch user | su - appuser |
| 81 | env | Show environment | env | sort |
| 82 | export | Set environment variable | export JAVA_HOME=/opt/jdk |
| 83 | alias | Create shortcut | alias ll='ls -lah' |
| 84 | history | Command history | history | tail -20 |
| 85 | clear | Clear terminal | clear |
| 86 | echo | Print text/variables | echo $PATH |
| 87 | printf | Formatted output | printf '%s\n' hello |
| 88 | date | Show date/time | date '+%F %T' |
| 89 | cal | Calendar | cal |
| 90 | sleep | Pause in scripts | sleep 5 |
| 91 | watch | Repeat command | watch -n 2 'df -h' |
| 92 | crontab | Schedule recurring jobs | crontab -e |
| 93 | systemctl | Manage systemd services | systemctl status app |
| 94 | journalctl | Read service logs | journalctl -u app -f |
| 95 | hostname | Show host name | hostname |
| 96 | uname | Kernel/system info | uname -a |
| 97 | whoami | Current user | whoami |
| 98 | id | User and groups | id |
| 99 | mount | Mounted filesystems | mount | grep /data |
| 100 | umount | Unmount filesystem | umount /mnt/backup |
| 101 | docker | Container CLI | docker ps |
| 102 | git | Version control | git status |