1. What is an Operating System (OS)?
Interview Question
What is an Operating System?
Answer
An Operating System (OS) is software that acts as an interface between users/applications and computer hardware.
Responsibilities:
- Process management
- Memory management
- File system management
- Device management
- Security and permissions
- Networking
Examples:
- Linux
- Windows
- macOS
Real Life Example
When you open Chrome:
- Chrome requests CPU resources.
- OS allocates RAM.
- OS schedules CPU time.
- OS accesses files from disk.
- OS displays output on screen.
Without an OS, hardware cannot be efficiently utilized.
2. What Happens When You Type a Command in Linux?
Example
ls
Answer
- User enters command in Shell.
- Shell sends request to Kernel.
- Kernel schedules process.
- CPU executes instructions.
- Output returned to Shell.
- Shell displays result.
Flow:
User
↓
Shell
↓
Kernel
↓
CPU/RAM
↓
Output
3. What is Linux?
Answer
Linux is an open-source operating system kernel.
Common distributions:
- Ubuntu
- CentOS
- Red Hat
- Amazon Linux
- Debian
Why Linux?
- Secure
- Stable
- Free
- Highly customizable
- Most cloud servers use Linux
4. What is a Kernel?
Answer
Kernel is the core of the operating system.
Responsibilities:
- Process management
- Memory management
- Hardware communication
- Device drivers
Example:
Chrome requests memory.
Kernel decides:
- How much RAM
- Which CPU core
- What permissions
5. What is a Process?
Answer
A process is a running instance of a program.
Example:
firefox
When Firefox starts:
- Process ID assigned
- Memory allocated
- CPU assigned
Check processes:
ps -ef
or
top
6. What is PID?
Answer
PID = Process ID
Every running process gets a unique number.
Example:
ps -ef
Output:
root 1234 nginx
1234 is PID.
7. What is RAM?
Answer
RAM (Random Access Memory) is temporary memory used by running applications.
Example:
Application running:
- Stored in RAM
Server reboot:
- RAM contents disappear
8. Difference Between RAM and Disk
| RAM | Disk |
|---|---|
| Temporary | Permanent |
| Fast | Slower |
| Lost after reboot | Survives reboot |
| Running programs | File storage |
9. What is a File System?
Answer
File System organizes files and directories on storage.
Examples:
- ext4
- xfs
- NTFS
Linux stores everything as files.
10. Linux Directory Structure
Question
Explain Linux file system hierarchy.
Answer
/
├── bin
├── etc
├── home
├── var
├── tmp
├── opt
├── usr
Important Directories
/etc
Configuration files
/etc/nginx/nginx.conf
/var
Logs
/var/log
/home
User files
/home/ec2-user
/tmp
Temporary files
/bin
System commands
ls
cp
mv
11. What is Troubleshooting?
Answer
Troubleshooting is a systematic process of finding and fixing issues.
Steps
- Identify problem
- Collect logs
- Verify symptoms
- Find root cause
- Fix issue
- Verify fix
12. Website Not Working. How Do You Troubleshoot?
Answer
Step 1
Check DNS
nslookup google.com
Step 2
Check connectivity
ping
Step 3
Check port
telnet hostname 80
Step 4
Check service
systemctl status nginx
Step 5
Check logs
journalctl
or
cat /var/log/nginx/error.log
13. What is Hardware?
Answer
Physical components of a computer.
Examples:
- CPU
- RAM
- SSD
- Motherboard
- NIC
14. What is Software?
Answer
Programs that run on hardware.
Examples:
- Linux
- Windows
- Chrome
- Docker
15. CPU vs RAM
CPU
Brain of computer.
Executes instructions.
RAM
Working memory.
Stores active data.
16. What is a Server?
Answer
A server is a computer that provides services to other computers.
Examples:
- Web Server
- Database Server
- DNS Server
17. What is AWS?
Interview Question
What is AWS?
Answer
AWS stands for Amazon Web Services.
Cloud platform providing:
- Compute
- Storage
- Networking
- Databases
- Security
Benefits:
- Pay as you go
- Highly available
- Scalable
18. What is a Region?
Answer
A Region is a geographical area containing multiple Availability Zones.
Examples:
- us-east-1
- us-east-2
- eu-west-1
19. What is an Availability Zone?
Answer
Availability Zone (AZ) is one or more data centers inside a region.
Example:
us-east-1
├── us-east-1a
├── us-east-1b
├── us-east-1c
Applications are deployed across multiple AZs for high availability.
20. What is EC2?
Answer
EC2 = Elastic Compute Cloud
Virtual server in AWS.
Used to run:
- Applications
- Databases
- Websites
Example:
Launch Linux EC2.
SSH into it.
Install nginx.
Host website.
21. What is EBS?
Answer
EBS = Elastic Block Store
Persistent storage attached to EC2.
Like a virtual hard drive.
Example:
EC2
↓
EBS Volume
If EC2 stops:
Data remains on EBS.
22. What is S3?
Answer
S3 = Simple Storage Service
Object storage.
Stores:
- Images
- Videos
- Backups
- Logs
Example:
bucket
├─ image.jpg
├─ video.mp4
└─ logs.txt
Features:
- Durable
- Scalable
- Cheap
23. What is ECS?
Answer
ECS = Elastic Container Service
AWS container orchestration service.
Runs Docker containers.
Components
- Cluster
- Task Definition
- Service
- Task
Flow:
Docker Image
↓
ECR
↓
ECS Task
↓
ECS Service
24. What is Lambda?
Answer
AWS Lambda is serverless compute.
You upload code.
AWS runs it.
No server management required.
Example:
API Gateway
↓
Lambda
↓
S3
25. What is API Gateway?
Answer
API Gateway exposes APIs to users.
Acts as front door for backend services.
Example:
User
↓
API Gateway
↓
Lambda
↓
Database
Benefits:
- Authentication
- Throttling
- Monitoring
26. How Do Two Computers Communicate?
Answer
Example:
Laptop → Google Server
Step 1
Laptop gets IP address.
Example:
192.168.1.10
Step 2
DNS resolves domain.
google.com
↓
142.x.x.x
Step 3
TCP connection established.
3-Way Handshake:
SYN
SYN-ACK
ACK
Step 4
Data exchanged.
Step 5
Response returned.
27. Explain OSI Model
Answer
OSI has 7 layers.
7 Application
6 Presentation
5 Session
4 Transport
3 Network
2 Data Link
1 Physical
Layer 7 Application
User applications.
Examples:
- Chrome
- Firefox
Protocols:
- HTTP
- HTTPS
Layer 6 Presentation
Encryption.
Examples:
- SSL
- TLS
Layer 5 Session
Maintains communication sessions.
Layer 4 Transport
Reliable communication.
Protocols:
- TCP
- UDP
Layer 3 Network
Routing.
Device:
- Router
Protocol:
- IP
Layer 2 Data Link
MAC addresses.
Device:
- Switch
Layer 1 Physical
Cables and signals.
Examples:
- Fiber
- Ethernet
28. Explain TCP 3-Way Handshake
Answer
Connection establishment:
Client → SYN
Server → SYN-ACK
Client → ACK
After this, data transfer begins.
29. What is DNS?
Answer
DNS converts domain names into IP addresses.
Example:
google.com
↓
142.250.x.x
Command:
nslookup google.com
30. Common Linux Commands Every DevOps Engineer Must Know
pwd
ls -la
cd
cp
mv
rm
mkdir
find
grep
cat
less
tail
head
chmod
chown
ps
top
df -h
du -sh
free -m
netstat
ss
curl
wget
systemctl
journalctl
These are the foundational interview questions for DevOps, Linux, Cloud, SRE, and AWS roles. A 6-year DevOps interview will often build on these basics and then move into Docker, Kubernetes, Terraform, CI/CD, VPCs, Load Balancers, Auto Scaling, IAM, monitoring, logging, and troubleshooting scenarios.
Top comments (0)