🐧 Linux Interview Questions Every DevOps Engineer Must Know

Tech enthusiast | Code craftsman | DevOps explorer | Turning bugs into features one line at a time 🚀
🔰 Beginner-Level Linux Interview Questions
1️⃣ What is Linux?
Linux is an open-source, Unix-like operating system kernel used to manage hardware resources and provide services to applications.
📌 Examples:
Ubuntu
CentOS
Amazon Linux
Red Hat Enterprise Linux (RHEL)
2️⃣ What is the Linux Kernel?
The kernel is the core of the operating system that:
Manages CPU, memory, and devices
Handles process scheduling
Acts as a bridge between hardware and software
3️⃣ Difference between Linux and Unix?
| Linux | Unix |
| Open source | Mostly proprietary |
| Free | Paid |
| Community driven | Vendor controlled |
| Widely used in cloud | Limited usage |
4️⃣ What is a Shell?
A shell is a command-line interface that allows users to interact with the Linux OS.
Popular shells:
bash
zsh
sh
5️⃣ Common Linux Commands
ls # list files
pwd # current directory
cd # change directory
mkdir # create directory
rm # delete file
cp # copy file
mv # move/rename file
⚙️ Intermediate-Level Linux Interview Questions
6️⃣ What is the difference between rm and rm -r?
rm file→ deletes a filerm -r dir→ deletes a directory recursively
7️⃣ What are Linux file permissions?
Linux permissions are:
Read (r) – 4
Write (w) – 2
Execute (x) – 1
Example:
chmod 754 file.sh
Meaning:
Owner: rwx
Group: r-x
Others: r--
8️⃣ What is a process in Linux?
A process is a running instance of a program.
Commands:
ps
top
htop
kill
9️⃣ Difference between ps and top?
| ps | top |
| Static output | Real-time |
| Snapshot | Dynamic |
| Lightweight | Interactive |
🔟 What is a daemon?
A daemon is a background process that runs continuously.
Examples:
sshdcronsystemd
🧠 Advanced Linux Interview Questions
1️⃣1️⃣ What is the difference between Soft link and Hard link?
| Hard Link | Soft Link |
| Same inode | Different inode |
| Cannot cross filesystem | Can cross filesystem |
| Works even if original deleted | Breaks if original deleted |
1️⃣2️⃣ What is inode?
An inode stores metadata about a file:
File size
Permissions
Owner
Disk location
📌 File name is not stored in inode.
1️⃣3️⃣ What is swap space?
Swap is disk space used as virtual memory when RAM is full.
Commands:
free -h
swapon -s
1️⃣4️⃣ What is cron?
cron is a job scheduler used to run tasks automatically.
Example:
0 2 * * * backup.sh
➡ Runs daily at 2 AM
1️⃣5️⃣ Explain booting process in Linux
BIOS/UEFI
Bootloader (GRUB)
Kernel
init/systemd
User space
🚀 Linux + DevOps Interview Questions
1️⃣6️⃣ How Linux is used in DevOps?
Running Docker containers
Managing Kubernetes nodes
CI/CD pipelines
Cloud servers (AWS EC2, GCP, Azure)
1️⃣7️⃣ Difference between systemctl and service?
| systemctl | service |
| Used in systemd | Used in SysVinit |
| Modern | Legacy |
| More control | Limited |
📝 Final Tips for Linux Interviews
✔ Practice commands daily
✔ Understand why, not just how
✔ Use real-world examples
✔ Learn Linux from a DevOps perspective
📌 Conclusion
Linux is not just an operating system — it’s a core skill for DevOps engineers. Mastering Linux fundamentals gives you confidence in interviews and real production environments.



