DEV Community

Aisalkyn Aidarova
Aisalkyn Aidarova

Posted on

This is a strong interview-preparation guide for a DevOps/SRE/Cloud Engineer role.

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:

  1. Chrome requests CPU resources.
  2. OS allocates RAM.
  3. OS schedules CPU time.
  4. OS accesses files from disk.
  5. 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
Enter fullscreen mode Exit fullscreen mode

Answer

  1. User enters command in Shell.
  2. Shell sends request to Kernel.
  3. Kernel schedules process.
  4. CPU executes instructions.
  5. Output returned to Shell.
  6. Shell displays result.

Flow:

User
 ↓
Shell
 ↓
Kernel
 ↓
CPU/RAM
 ↓
Output
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

When Firefox starts:

  • Process ID assigned
  • Memory allocated
  • CPU assigned

Check processes:

ps -ef
Enter fullscreen mode Exit fullscreen mode

or

top
Enter fullscreen mode Exit fullscreen mode

6. What is PID?

Answer

PID = Process ID

Every running process gets a unique number.

Example:

ps -ef
Enter fullscreen mode Exit fullscreen mode

Output:

root 1234 nginx
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Important Directories

/etc

Configuration files

/etc/nginx/nginx.conf
Enter fullscreen mode Exit fullscreen mode

/var

Logs

/var/log
Enter fullscreen mode Exit fullscreen mode

/home

User files

/home/ec2-user
Enter fullscreen mode Exit fullscreen mode

/tmp

Temporary files


/bin

System commands

ls
cp
mv
Enter fullscreen mode Exit fullscreen mode

11. What is Troubleshooting?

Answer

Troubleshooting is a systematic process of finding and fixing issues.

Steps

  1. Identify problem
  2. Collect logs
  3. Verify symptoms
  4. Find root cause
  5. Fix issue
  6. Verify fix

12. Website Not Working. How Do You Troubleshoot?

Answer

Step 1

Check DNS

nslookup google.com
Enter fullscreen mode Exit fullscreen mode

Step 2

Check connectivity

ping
Enter fullscreen mode Exit fullscreen mode

Step 3

Check port

telnet hostname 80
Enter fullscreen mode Exit fullscreen mode

Step 4

Check service

systemctl status nginx
Enter fullscreen mode Exit fullscreen mode

Step 5

Check logs

journalctl
Enter fullscreen mode Exit fullscreen mode

or

cat /var/log/nginx/error.log
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Step 2

DNS resolves domain.

google.com
↓
142.x.x.x
Enter fullscreen mode Exit fullscreen mode

Step 3

TCP connection established.

3-Way Handshake:

SYN
SYN-ACK
ACK
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

After this, data transfer begins.


29. What is DNS?

Answer

DNS converts domain names into IP addresses.

Example:

google.com
↓
142.250.x.x
Enter fullscreen mode Exit fullscreen mode

Command:

nslookup google.com
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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)