Skip to main content

Command Palette

Search for a command to run...

1. 🐧 Linux Fundamentals for DevOps Engineers

Published
β€’2 min readβ€’View as Markdown
N

Open to Work | Cloud & DevOps Engineer | AWS | Kubernetes | Terraform | CI/CD | Automations | Available for Full-Time / Freelance / Mentorship

πŸ”Ή Why Linux is Important for DevOps?

Linux is the backbone of:

  • Cloud servers

  • Containers

  • CI/CD runners

  • Kubernetes nodes


πŸ”Ή Process vs Thread

  • Process: Independent execution unit with its own memory

  • Thread: Lightweight execution unit sharing process memory

πŸ‘‰ Example: One Java process running multiple threads.


πŸ”Ή Check CPU, Memory & Disk Usage

top
htop
free -m
df -h

πŸ”Ή Find High Memory Consuming Process

ps aux --sort=-%mem | head

πŸ”Ή System Monitoring Commands Explained

CommandUse
topReal-time stats
vmstatCPU, memory & IO
freeRAM usage
dfDisk usage

πŸ”Ή Check and Kill a Process

ps -ef | grep java
kill -9 <PID>

πŸ”Ή Find Which Service Uses a Port

netstat -tulnp | grep 8080
ss -tulnp
lsof -i :8080

πŸ”Ή Linux File Permissions

chmod 755 script.sh
chown user:group script.sh
  • r=4, w=2, x=1

πŸ”Ή Linux Logs

tail -f /var/log/syslog
journalctl -u docker
journalctl -xe

ln -s file softlink
ln file hardlink
SoftHard
Cross FSSame FS
BreaksSafe

πŸ”Ή Troubleshooting Tips

  • High CPU β†’ top, htop

  • Low Disk β†’ du -sh, df -h


πŸ”Ή Uptime & Reboot History

uptime
last reboot

πŸ”Ή Scheduling Jobs

crontab -e
0 2 * * * backup.sh

πŸ”Ή find, grep, awk, sed

find /var -name "*.log"
grep ERROR app.log
awk '{print $1}' file.txt
sed 's/dev/prod/g' file.txt

🎯 Key Takeaways

  • Linux is non-negotiable for DevOps

  • Monitoring & troubleshooting are daily tasks

  • These commands are interview favorites

More from this blog

Beginner to Advanced

16 posts