If you're working in DevOps, Linux is not optional—it's your daily workspace.
Whether you're troubleshooting production issues, deploying applications, checking logs, managing users, or debugging network problems, Linux commands are the tools you’ll use constantly.
In this guide, I’ve compiled 50 essential Linux commands every DevOps engineer should know, organized by category with practical explanations.
Let’s get into it.
1. File & Directory Management
1. pwd — Print Working Directory
Shows your current directory.
pwd
Example output:
/home/pawan/projects
2. ls — List Files
Displays files and directories.
ls -la
3. cd — Change Directory
Move between directories.
cd /var/log
4. mkdir — Create Directory
Create new folders.
mkdir backup
5. rmdir — Remove Empty Directory
Deletes empty folders.
rmdir backup
6. touch — Create Empty File
Create a new file.
touch app.log
7. cp — Copy Files
Copy files or folders.
cp app.conf backup.conf
8. mv — Move or Rename
Move or rename files.
mv old.log new.log
9. rm — Remove Files
Delete files/directories.
rm -rf temp/
10. find — Search Files
Locate files quickly.
find /var/log -name "*.log"
2. File Viewing & Text Processing
11. cat
Display file content.
cat config.yml
12. less
Read large files interactively.
less /var/log/syslog
``
## 13. `head`
View first lines.
bash
head -20 app.log
## 14. `tail`
View last lines.
bash
tail -f app.log
## 15. `grep`
Search text patterns.
bash
grep "ERROR" app.log
## 16. `sed`
Edit/replace text.
bash
sed 's/dev/prod/g' config.txt
## 17. `awk`
Powerful text processing.
bash
awk '{print $1}' users.txt
## 18. `cut`
Extract columns.
bash
cut -d ":" -f1 /etc/passwd
## 19. `sort`
Sort content.
bash
sort names.txt
## 20. `uniq`
Remove duplicates.
bash
uniq users.txt
# 3. Permissions & Ownership
## 21. `chmod`
Change permissions.
bash
chmod 755 deploy.sh
## 22. `chown`
Change ownership.
bash
chown ubuntu:ubuntu app.log
## 23. `chgrp`
Change group ownership.
bash
chgrp developers script.sh
## 24. `umask`
Default permission settings.
bash
umask
# 4. Process Management
## 25. `ps`
Show running processes.
bash
ps aux
## 26. `top`
Live process monitoring.
bash
top
## 27. `htop`
Interactive process viewer.
bash
htop
## 28. `kill`
Terminate process.
bash
kill 1234
## 29. `killall`
Kill by process name.
bash
killall nginx
## 30. `jobs`
Background jobs.
bash
jobs
## 31. `bg`
Resume in background.
bash
bg
## 32. `fg`
Bring to foreground.
bash
fg
# 5. Networking Commands
## 33. `ping`
Check connectivity.
bash
ping google.com
## 34. `curl`
Transfer data / API testing.
bash
curl https://api.github.com
## 35. `wget`
Download files.
bash
wget https://example.com/file.zip
## 36. `ssh`
Remote login.
bash
ssh user@server-ip
## 37. `scp`
Secure file transfer.
bash
scp app.tar.gz user@server:/tmp
## 38. `ss`
Socket statistics.
bash
ss -tulnp
## 39. `dig`
DNS lookup.
bash
dig google.com
## 40. `nslookup`
DNS troubleshooting.
bash
nslookup google.com
# 6. Disk & Storage
## 41. `df`
Disk usage.
bash
df -h
## 42. `du`
Directory size.
bash
du -sh /var/log
## 43. `lsblk`
Block devices.
bash
lsblk
## 44. `mount`
Mount filesystem.
bash
mount /dev/sdb1 /mnt
## 45. `umount`
Unmount filesystem.
bash
umount /mnt
# 7. System Information
## 46. `uname`
Kernel/system info.
bash
uname -a
## 47. `hostname`
Machine name.
bash
hostname
## 48. `whoami`
Current user.
bash
whoami
## 49. `uptime`
System uptime/load.
bash
uptime
## 50. `free`
Memory usage.
bash
free -h
# Final Thoughts
Linux commands are the foundation of DevOps work.
You don’t need to memorize everything on day one—but becoming comfortable with these commands will make your life significantly easier in real-world infrastructure, automation, and troubleshooting tasks.
**Which Linux command do you use every day? Drop it in the comments.**















