This is a very large topic. For a DevOps/SRE interview, these are the most common questions with answers and explanations.
1. What is an Operating System (OS)?
Answer
An Operating System is software that manages hardware resources and provides services for applications.
Examples:
- Linux
- Windows
- macOS
Responsibilities
- Process management
- Memory management
- File management
- User management
- Network management
- Device management
Real Example
When you open Chrome:
- OS allocates RAM.
- OS schedules CPU.
- OS accesses files from disk.
- OS handles network traffic.
2. What are the main Linux Components?
Answer
Linux consists of:
Kernel
Core of Linux.
Responsible for:
- CPU scheduling
- Memory management
- Device drivers
- Networking
Shell
Examples:
- Bash
- Zsh
- Sh
Responsible for:
- Executing commands
File System
Stores:
- Files
- Directories
System Libraries
Allow applications to communicate with the kernel.
User Space Applications
Examples:
- nginx
- docker
- kubectl
3. Explain Linux Boot Process
Answer
- BIOS/UEFI starts
- GRUB bootloader loads
- Linux kernel loads
- systemd starts
- Services start
- Login prompt appears
4. What is CPU?
Answer
CPU = Central Processing Unit
It executes instructions.
Think of CPU as the brain of the computer.
Responsibilities
- Calculations
- Running applications
- Scheduling processes
Check CPU
lscpu
top
htop
5. What is RAM?
Answer
RAM = Random Access Memory
Temporary storage used by running applications.
Example
Application running:
- CPU processes data
- RAM stores active data
Check RAM
free -h
top
vmstat
6. Difference Between RAM and Disk
| RAM | Disk |
|---|---|
| Temporary | Permanent |
| Faster | Slower |
| Lost after reboot | Saved after reboot |
7. What is a Process?
Answer
A process is a running program.
Example:
ps -ef
Show all processes.
8. What is a Thread?
Answer
A thread is a lightweight execution unit inside a process.
Example:
Google Chrome:
- One process
- Many threads
9. Linux Directory Structure
What is / ?
Root directory.
Important Directories
/etc
Configuration files
Examples:
/etc/passwd
/etc/hosts
/var
Logs
Examples:
/var/log
/home
User files
/tmp
Temporary files
/bin
Basic commands
/usr
Installed applications
/opt
Third-party applications
/dev
Devices
Example:
/dev/sda
/proc
Kernel information
10. What is a File?
Everything in Linux is treated as a file.
Examples:
- Regular file
- Directory
- Device
- Socket
Check:
ls -l
11. File Permissions
Example:
-rwxr-xr-x
Meaning
Owner:
rwx
Group:
r-x
Others:
r-x
Change permissions
chmod 755 file
12. Network Troubleshooting Questions
Check IP
ip a
Check Routing
ip route
Check DNS
nslookup google.com
or
dig google.com
Check Connectivity
ping google.com
Check Port
nc -zv host 443
Check Open Connections
ss -tulpn
Trace Network Path
traceroute google.com
13. What is DNS?
Answer
DNS converts:
google.com
to
142.250.x.x
Without DNS you would need to remember IP addresses.
14. TCP vs UDP
TCP
Reliable
Examples:
- HTTPS
- SSH
UDP
Faster
Examples:
- DNS
- Video streaming
15. What is AWS?
Answer
Amazon Web Services is a cloud platform that provides:
- Compute
- Storage
- Networking
- Security
Pay only for what you use.
16. What is EC2?
Answer
Amazon EC2 is a virtual machine in AWS.
Used for:
- Applications
- Databases
- Containers
17. What is Elastic IP?
Answer
Static public IP address.
Used when:
- Public IP must not change.
Example:
- Bastion host
- Web server
18. What is EBS?
Answer
Amazon EBS = Block Storage
Think:
Virtual hard drive attached to EC2.
Features
- Persistent
- Fast
- Single AZ
19. What is EFS?
Answer
Amazon EFS = Shared File System
Many EC2 instances can mount the same storage.
Uses
- Shared application files
- Kubernetes persistent storage
20. EBS vs EFS
| EBS | EFS |
|---|---|
| Block Storage | File Storage |
| One EC2 | Many EC2 |
| Single AZ | Multi-AZ |
| Faster | Shared |
21. What is S3?
Answer
Amazon S3
Stores:
- Images
- Videos
- Backups
- Logs
Unlimited scale.
22. What is CloudFront?
Answer
Amazon CloudFront
CDN service.
Caches content close to users.
Benefits
- Faster websites
- Lower latency
- DDoS protection
23. What is Load Balancer?
Answer
Distributes traffic among servers.
Example:
1000 users
|
ALB
/ \
EC2 EC2
24. What is ALB?
Answer
Application Load Balancer
Works at:
- HTTP
- HTTPS
Can route:
/app
/api
/images
to different targets.
25. What is NLB?
Answer
Network Load Balancer
Works at:
- TCP
- UDP
Used for:
- High performance
- Millions of requests
26. ALB vs NLB
| ALB | NLB |
|---|---|
| Layer 7 | Layer 4 |
| HTTP/HTTPS | TCP/UDP |
| Path Routing | No Path Routing |
| Web Apps | High-performance apps |
27. What is Auto Scaling Group?
Answer
Automatically adds or removes EC2 instances.
Example:
CPU > 70%
2 EC2 → 4 EC2
Traffic decreases:
4 EC2 → 2 EC2
28. What is Reserved Instance?
Answer
Commit for:
- 1 year
- 3 years
Receive large discount.
Used for predictable workloads.
29. What is Spot Instance?
Answer
Unused AWS capacity.
Up to 90% cheaper.
Can be terminated anytime.
Best for:
- Batch jobs
- CI/CD
- Testing
30. What is Dedicated Host?
Answer
Physical server dedicated only to one customer.
No other AWS customers share that hardware.
Used for:
- Compliance
- Licensing requirements
31. What is Security Group?
Answer
Virtual firewall for EC2.
Example:
Allow:
22 SSH
80 HTTP
443 HTTPS
Deny everything else.
32. What is VPC?
Answer
Virtual network in AWS.
Contains:
- Subnets
- Route tables
- Security groups
- EC2
33. What is NAT Gateway?
Answer
Allows private instances to access internet.
Internet cannot initiate connections to them.
34. What is Route Table?
Answer
Network map telling traffic where to go.
Example:
0.0.0.0/0
→ Internet Gateway
35. What is Internet Gateway?
Answer
Allows public subnet resources to access internet.
36. Production Troubleshooting Question
Interviewer:
Application is down. What do you check?
Answer
Step 1
Check DNS
nslookup app.company.com
Step 2
Check Load Balancer
Target healthy?
Step 3
Check EC2
systemctl status nginx
Step 4
Check Ports
ss -tulpn
Step 5
Check Logs
journalctl -xe
tail -f /var/log/nginx/error.log
Step 6
Check Resources
top
free -h
df -h
Step 7
Check Network
ping
curl
traceroute
37. Top Linux Commands Every DevOps Engineer Must Know
pwd
ls
cd
mkdir
rm
cp
mv
cat
less
head
tail
grep
find
chmod
chown
ps
top
htop
kill
df -h
du -sh
free -h
ip a
ip route
ping
curl
wget
dig
nslookup
systemctl
journalctl
ssh
scp
tar
gzip
unzip
These cover roughly 80–90% of the Linux, AWS, networking, and troubleshooting questions commonly asked in DevOps, SRE, Platform Engineer, and Cloud Engineer interviews.
Top comments (0)