惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
A
About on SuperTechFans
Vercel News
Vercel News
I
InfoQ
阮一峰的网络日志
阮一峰的网络日志
月光博客
月光博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
V
Visual Studio Blog
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
美团技术团队

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
50 Linux Commands Every DevOps Engineer Must Know
pawan nateka · 2026-05-25 · via DEV Community

50 Linux CommandIf 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

Enter fullscreen mode Exit fullscreen mode

Example output:

/home/pawan/projects

Enter fullscreen mode Exit fullscreen mode

2. ls — List Files

Displays files and directories.

ls -la

Enter fullscreen mode Exit fullscreen mode

3. cd — Change Directory

Move between directories.

cd /var/log

Enter fullscreen mode Exit fullscreen mode

4. mkdir — Create Directory

Create new folders.

mkdir backup

Enter fullscreen mode Exit fullscreen mode

5. rmdir — Remove Empty Directory

Deletes empty folders.

rmdir backup

Enter fullscreen mode Exit fullscreen mode

6. touch — Create Empty File

Create a new file.

touch app.log

Enter fullscreen mode Exit fullscreen mode

7. cp — Copy Files

Copy files or folders.

cp app.conf backup.conf

Enter fullscreen mode Exit fullscreen mode

8. mv — Move or Rename

Move or rename files.

mv old.log new.log

Enter fullscreen mode Exit fullscreen mode

9. rm — Remove Files

Delete files/directories.

rm -rf temp/

Enter fullscreen mode Exit fullscreen mode

10. find — Search Files

Locate files quickly.

find /var/log -name "*.log"

Enter fullscreen mode Exit fullscreen mode

2. File Viewing & Text Processing

11. cat

Display file content.

cat config.yml

Enter fullscreen mode Exit fullscreen mode

12. less

Read large files interactively.

less /var/log/syslog
``

## 13. `head`

View first lines.

Enter fullscreen mode Exit fullscreen mode


bash
head -20 app.log


## 14. `tail`

View last lines.

Enter fullscreen mode Exit fullscreen mode


bash
tail -f app.log


## 15. `grep`

Search text patterns.

Enter fullscreen mode Exit fullscreen mode


bash
grep "ERROR" app.log


## 16. `sed`

Edit/replace text.

Enter fullscreen mode Exit fullscreen mode


bash
sed 's/dev/prod/g' config.txt


## 17. `awk`

Powerful text processing.

Enter fullscreen mode Exit fullscreen mode


bash
awk '{print $1}' users.txt



## 18. `cut`

Extract columns.

Enter fullscreen mode Exit fullscreen mode


bash
cut -d ":" -f1 /etc/passwd


## 19. `sort`

Sort content.

Enter fullscreen mode Exit fullscreen mode


bash
sort names.txt


## 20. `uniq`

Remove duplicates.

Enter fullscreen mode Exit fullscreen mode


bash
uniq users.txt


# 3. Permissions & Ownership

## 21. `chmod`

Change permissions.

Enter fullscreen mode Exit fullscreen mode


bash
chmod 755 deploy.sh


## 22. `chown`

Change ownership.

Enter fullscreen mode Exit fullscreen mode


bash
chown ubuntu:ubuntu app.log


## 23. `chgrp`

Change group ownership.

Enter fullscreen mode Exit fullscreen mode


bash
chgrp developers script.sh


## 24. `umask`

Default permission settings.

Enter fullscreen mode Exit fullscreen mode


bash
umask


# 4. Process Management

## 25. `ps`

Show running processes.

Enter fullscreen mode Exit fullscreen mode


bash
ps aux


## 26. `top`

Live process monitoring.

Enter fullscreen mode Exit fullscreen mode


bash
top


## 27. `htop`

Interactive process viewer.

Enter fullscreen mode Exit fullscreen mode


bash
htop


## 28. `kill`

Terminate process.

Enter fullscreen mode Exit fullscreen mode


bash
kill 1234


## 29. `killall`

Kill by process name.

Enter fullscreen mode Exit fullscreen mode


bash
killall nginx


## 30. `jobs`

Background jobs.

Enter fullscreen mode Exit fullscreen mode


bash
jobs


## 31. `bg`

Resume in background.

Enter fullscreen mode Exit fullscreen mode


bash
bg


## 32. `fg`

Bring to foreground.

Enter fullscreen mode Exit fullscreen mode


bash
fg


# 5. Networking Commands

## 33. `ping`

Check connectivity.

Enter fullscreen mode Exit fullscreen mode


bash
ping google.com


## 34. `curl`

Transfer data / API testing.

Enter fullscreen mode Exit fullscreen mode


bash
curl https://api.github.com


## 35. `wget`

Download files.

Enter fullscreen mode Exit fullscreen mode


bash
wget https://example.com/file.zip


## 36. `ssh`

Remote login.

Enter fullscreen mode Exit fullscreen mode


bash
ssh user@server-ip


## 37. `scp`

Secure file transfer.

Enter fullscreen mode Exit fullscreen mode


bash
scp app.tar.gz user@server:/tmp


## 38. `ss`

Socket statistics.

Enter fullscreen mode Exit fullscreen mode


bash
ss -tulnp


## 39. `dig`

DNS lookup.

Enter fullscreen mode Exit fullscreen mode


bash
dig google.com


## 40. `nslookup`

DNS troubleshooting.

Enter fullscreen mode Exit fullscreen mode


bash
nslookup google.com


# 6. Disk & Storage

## 41. `df`

Disk usage.

Enter fullscreen mode Exit fullscreen mode


bash
df -h


## 42. `du`

Directory size.

Enter fullscreen mode Exit fullscreen mode


bash
du -sh /var/log


## 43. `lsblk`

Block devices.

Enter fullscreen mode Exit fullscreen mode


bash
lsblk


## 44. `mount`

Mount filesystem.

Enter fullscreen mode Exit fullscreen mode


bash
mount /dev/sdb1 /mnt



## 45. `umount`

Unmount filesystem.

Enter fullscreen mode Exit fullscreen mode


bash
umount /mnt


# 7. System Information

## 46. `uname`

Kernel/system info.

Enter fullscreen mode Exit fullscreen mode


bash
uname -a


## 47. `hostname`

Machine name.

Enter fullscreen mode Exit fullscreen mode


bash
hostname


## 48. `whoami`

Current user.

Enter fullscreen mode Exit fullscreen mode


bash
whoami



## 49. `uptime`

System uptime/load.

Enter fullscreen mode Exit fullscreen mode


bash
uptime



## 50. `free`

Memory usage.

Enter fullscreen mode Exit fullscreen mode


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.**


Enter fullscreen mode Exit fullscreen mode