The short version
The list
- 1
grep + ripgrep — searching files
grep searches text by pattern: `grep -r 'ERROR' /var/log/` (recursive), `grep -i` (case-insensitive), `grep -v` (invert), `grep -E` (extended regex), `grep -A 5 -B 2` (5 lines after, 2 before). Modern alternative: rg (ripgrep) — faster, respects .gitignore by default, sane defaults.
Why it matters: Asked at ~90% of Pune DevOps interviews. Walking through log inspection with grep flags signals operational fluency.
Best for: Foundation; you'll use this every day in production.
- 2
find + locate — finding files
find searches by attributes: `find /var/log -name '*.log' -mtime -7` (modified in last 7 days), `find . -size +100M` (over 100MB), `find / -user www-data` (owned by user), `find . -exec rm {} \;` (delete matched files — careful!). locate uses a prebuilt index for fast name-only searches.
Why it matters: Asked at ~60% of Pune rounds. Walk through 'how would you find files modified by a specific user yesterday over a certain size' to demonstrate depth.
Best for: File system inspection; auditing + cleanup work.
- 3
ps + top + htop — process inspection
ps aux: snapshot of all processes; ps aux --sort=-%mem | head: top memory consumers. top: live updating process view; htop: nicer interactive top. Look for high CPU, high memory, runaway processes. Press k in htop to kill; SHIFT+F to filter.
Why it matters: Asked at ~75% of Pune rounds. 'Server is slow, what do you check?' is the canonical question — ps + top + htop is part of the answer.
Best for: Performance troubleshooting; expected at every tier.
- 4
df + du — disk usage
df -h: filesystem disk usage (human-readable). du -sh /var/log/*: size of each item in a directory. `du -sh . | sort -h` (sort by size). Quickly find what's filling a disk. Common production issue: log files growing unbounded.
Why it matters: Asked at ~60% of Pune rounds. 'Disk is at 95%, what do you do?' → df + du + investigate + truncate or rotate logs.
Best for: Production troubleshooting; disk-space alerts are common.
- 5
netstat + ss + lsof — network + open files
ss -tulnp: listening ports + processes (modern replacement for netstat). lsof -i :8080: what process holds port 8080. lsof -p PID: all files opened by a process (network sockets count). Use these to debug 'port already in use' errors + identify zombie listeners.
Why it matters: Asked at ~50% of Pune rounds. Networking interview questions often involve walking through these commands.
Best for: Networking + connection troubleshooting.
- 6
curl + wget — HTTP testing + downloads
curl -i URL: show response headers + body. curl -X POST -H 'Content-Type: application/json' -d '{json}' URL: POST request. curl --resolve example.com:443:1.2.3.4 URL: test DNS routing. wget: focused on file download with retries. Both are essential for API debugging + scripted downloads.
Why it matters: Asked at ~55% of Pune rounds. Knowing curl flags fluently signals API + debugging maturity.
Best for: API + network debugging.
- 7
chmod + chown + chgrp — permissions + ownership
chmod 755 file: rwxr-xr-x (owner full, others read+execute). chmod +x script.sh: make executable. chown user:group file: change owner + group. chmod -R 644 dir: recursive (use carefully). Understand the octal notation (read=4, write=2, execute=1, sum permissions).
Why it matters: Asked at ~50% of Pune rounds. Pune BFSI + security-conscious interviews probe permissions depth.
Best for: Security + filesystem permissions; foundational.
- 8
systemctl + journalctl — service + log management
systemctl status nginx: service status. systemctl restart nginx: restart. systemctl enable nginx: start on boot. journalctl -u nginx -f: tail nginx logs (-f = follow). journalctl --since '1 hour ago': time-filtered logs. systemd is the universal Linux init system since ~2015.
Why it matters: Asked at ~70% of Pune rounds. Production server work assumes systemctl + journalctl fluency.
Best for: Service management + log diagnosis.
- 9
sed + awk — text transformation in pipelines
sed for find-and-replace: `sed -i 's/old/new/g' file.txt` (in-place edit). awk for column-aware text processing: `awk '{print $2}' file.txt` (2nd column), `awk -F',' '{sum+=$3} END {print sum}'` (sum CSV 3rd column). Combine with grep + cut + sort + uniq for log analysis pipelines.
Why it matters: Asked at ~40% of Pune rounds. Log-analysis questions often expect sed/awk fluency at fresher tier.
Best for: Data manipulation in pipelines; senior-fresher signal.
- 10
tar + gzip + zip — archives + compression
tar -czf archive.tar.gz dir/: create gzipped tar. tar -xzf archive.tar.gz: extract. tar -tzf archive.tar.gz: list contents without extracting. gzip file: compress in place. zip -r archive.zip dir/: cross-platform-friendly archive. Backup + transfer workflows depend on these.
Why it matters: Asked at ~30% of Pune rounds. Backup workflows + log rotation patterns assume tar fluency.
Best for: Backup + transfer workflows.
How we built this list
Commands ranked by Pune DevOps + cloud fresher interview-frequency from Archer Infotech's placement-cell debriefs over 2024-2026 cycles + production-troubleshooting prevalence at services majors (Persistent, Capgemini, Cognizant cloud practices) + product cos (Druva, BrowserStack, Helpshift) + BFSI tech teams. Modern alternatives (ripgrep, ss, htop) preferred over legacy ones (grep, netstat, top) where applicable but both noted because production servers run varied OS versions.
FAQs
Common questions about linux commands for devops.
Do I need to memorise all the flags for these commands?
No. Memorise common-case patterns: the 3-5 most-used flag combinations per command. Use --help and man pages for the rest. Interviewers test fluency in the common cases + ability to find the right flag fast, not encyclopaedic recall. Your time is better spent practising on real log files than memorising obscure flags.
How do I practice Linux without a personal Linux machine?
Three free options: (1) WSL2 on Windows (most realistic; lets you run real Ubuntu/Debian). (2) Free-tier AWS EC2 instance (gives you a real production-like server). (3) Cloud9 / GitHub Codespaces / Replit (browser-based). WSL2 is the realistic recommendation — same kernel as your eventual production targets, free, runs on most modern Windows machines.
Should I learn bash scripting beyond these commands?
Yes — bash scripting is screened separately at Pune DevOps interviews. Foundation: variables, if statements, for loops, functions, command substitution `$(command)`, exit codes, set -e (fail on error), set -u (fail on undefined var). Build 5-10 real scripts (log rotation, backup, deploy, health check, log alert). 2-3 weeks of focused practice covers what fresher rounds probe.
What's the most-failed Linux question at Pune DevOps fresher interviews?
'Server is at 100% CPU + 95% disk + 90% memory — walk me through what you'd check.' Candidates often jump to one tool; the strong answer demonstrates a methodical flow: ps aux --sort=-%cpu (CPU), top (live overview), du -sh /* (disk by directory), free -m (memory), netstat -tulnp (network), journalctl --since (recent errors). The systematic approach signals operational maturity over panic-debugging.