Linux Interview Questions (2026): By Level, With Model Answers

How to use this

Almost every backend and infra role runs on Linux. These questions check whether a candidate can navigate, troubleshoot and reason about a running system.

Hiring a Linux developer is easy. Telling a real one from a convincing résumé is the hard part — and it’s most of what we do. These are grouped by level, because the same question that stretches a junior is a warm-up for a senior.

Junior Linux interview questions

0–2 years

Files, permissions and processes.

What do Linux file permissions mean?

What a strong answer covers

Read/write/execute for owner, group and others; chmod changes them and execute on a directory means the ability to enter it.

Red flag

Runs chmod 777 to “fix” permission problems.

What is the difference between absolute and relative paths?

What a strong answer covers

Absolute paths start from root /; relative paths are from the current directory.

Red flag

Confuses the two and scripts break when run elsewhere.

How do you inspect running processes?

What a strong answer covers

ps, top/htop show processes and resource use; you can identify and signal them by PID.

Red flag

Only knows how to kill by rebooting.

What does a pipe | do?

What a strong answer covers

Sends one command’s output as another’s input, composing small tools into pipelines.

Red flag

Writes intermediate files instead of piping.

What is the difference between a hard and soft link?

What a strong answer covers

A hard link is another name for the same inode; a symlink points to a path and can span filesystems and break if the target moves.

Red flag

Confuses the two.

How do you find files and text?

What a strong answer covers

find for files by attributes and grep for text within files.

Red flag

Manually browses directories to find things.

What are environment variables and how do you set them?

What a strong answer covers

Key-value settings for processes (PATH, etc.), set via export and read by programs.

Red flag

Hardcodes paths instead of using env vars.

What is the difference between a process and a thread?

What a strong answer covers

A process has its own memory; threads share a process’s memory and are lighter to create.

Red flag

Cannot distinguish them.

Mid-level Linux interview questions

2–5 years

Networking and shell.

How do you troubleshoot “disk full” issues?

What a strong answer covers

df for filesystem usage and du to find large directories/files; also check deleted-but-open files and inodes.

Red flag

Deletes random files hoping to free space.

How do standard streams and redirection work?

What a strong answer covers

stdin, stdout and stderr; redirect with >, >>, 2> and combine them, separating output from errors.

Red flag

Loses error output by redirecting only stdout.

How do you inspect network connectivity and ports?

What a strong answer covers

ss/netstat for listening ports and connections, curl for endpoints, and checking DNS and routes.

Red flag

Assumes “it’s a code bug” without checking the network.

What are signals and how do you use them?

What a strong answer covers

Notifications to processes (SIGTERM to ask to stop, SIGKILL to force); graceful shutdown handles SIGTERM.

Red flag

Always uses kill -9 first.

How does cron work?

What a strong answer covers

A scheduler running commands on a time schedule via crontab entries, useful for recurring jobs.

Red flag

Runs periodic tasks manually.

What is the difference between a login and non-login shell?

What a strong answer covers

They source different startup files, which explains why environment settings sometimes don’t apply.

Red flag

Baffled why an env var works interactively but not in a script/cron.

How do you check system resource usage?

What a strong answer covers

top/htop, free for memory, iostat/vmstat for I/O and CPU, to locate bottlenecks.

Red flag

Guesses at the bottleneck.

What is the purpose of sudo and least privilege?

What a strong answer covers

Running specific commands as another user (often root) with an audit trail, instead of logging in as root.

Red flag

Does everything as root.

Senior Linux interview questions

5+ years

Performance and reliability.

How do you diagnose high load or CPU on a server?

What a strong answer covers

Correlate top/load average with per-process usage, I/O wait and context switches to find whether it’s CPU, I/O or memory bound.

Red flag

Reboots without diagnosing.

How does the Linux memory model (including OOM) work?

What a strong answer covers

Virtual memory, page cache and swap; under pressure the OOM killer terminates processes — tuning limits avoids surprises.

Red flag

Confuses cache usage with a memory leak.

How do you investigate a process that’s misbehaving?

What a strong answer covers

Tools like strace, lsof and logs to see syscalls, open files and behaviour, narrowing from symptom to cause.

Red flag

Only reads application logs.

How do systemd services work?

What a strong answer covers

Units define how services start, restart and depend on each other; journalctl reads their logs.

Red flag

Starts services with ad-hoc scripts and no supervision.

How do you secure a Linux server?

What a strong answer covers

Least privilege, key-based SSH, a firewall, minimal running services, timely patching, and monitoring.

Red flag

Password SSH as root, everything open.

How do file descriptors and ulimits affect services?

What a strong answer covers

Processes have FD limits; high-connection servers must raise them or hit “too many open files.”

Red flag

Hits FD limits with no idea why.

How do you approach performance tuning holistically?

What a strong answer covers

Measure across CPU, memory, disk and network before changing anything, then target the actual bottleneck.

Red flag

Tweaks kernel parameters by superstition.

How do you automate server configuration reliably?

What a strong answer covers

Configuration management or immutable images so servers are reproducible rather than hand-tuned pets.

Red flag

Hand-configures each server differently.

Skip the screening entirely.We vet Linux engineers so you don’t have to — embed one in your team, or have us build it.

Hire Linux developersCompare us

Build and score a full interview with our free interview scorecard tool, browse the full question hub, or see how we interview engineers.

Share