Linux Interview Prep Guide: 6-Week Study Plan (2027)
Six-week Linux interview study plan with daily labs, 30 checkpoint questions by level, troubleshooting drills and a mock interview checklist.
A Linux interview preparation plan works best as six weeks of daily lab practice: the shell and filesystem first, then users and permissions, processes and systemd, storage, networking and security, and finally troubleshooting drills and mock interviews. Spend about 90 minutes a day on a practice VM, and test yourself every week with the checkpoint questions on this page.
This page is a study plan, not another question bank. When you want large sets of questions to practise against, use our scenario-based Linux interview questions (the main Linux interview page on this site) and the other guides linked in each week below. Commands were checked against the Red Hat Enterprise Linux documentation and the upstream man pages in November 2026.
Key takeaways
- Interviewers for Linux, DevOps and SRE roles test what you can do at a prompt, so most of your preparation time should be spent typing commands on a lab machine, not reading.
- Six weeks at roughly 90 minutes a day is enough for a fresher with basic computer skills to reach a confident level on common interview topics. Experienced engineers can compress weeks 1 and 2 into a few days.
- Every week ends with checkpoint questions. If you cannot answer them aloud without notes, repeat the week's labs before moving on.
- Week 6 is for troubleshooting drills and mock interviews, because scenario questions decide most interviews for candidates with experience.
- Keep a personal command notebook. Writing down each command with one real example is faster to revise than any article, this one included.
- If you also want a certification, the same plan covers much of the Red Hat RHCSA (EX200) syllabus. Check Red Hat's own exam page for current objectives.
Who this plan is for and how to adjust it
The plan assumes you can install software and use a terminal window, but nothing more. Use the table to decide where to start.
| Your situation | Where to start | Daily time | Focus |
|---|---|---|---|
| Fresher or career switcher | Week 1 | 90 minutes | Commands, filesystem, permissions; answer every checkpoint aloud |
| Developer moving into DevOps | Week 2 | 60 to 90 minutes | systemd, storage, networking, shell scripting |
| 2 to 5 years in support or operations | Week 3, skim 1 and 2 | 60 minutes | Storage, SELinux, performance, troubleshooting stories |
| Senior engineer or SRE | Week 5 | 45 to 60 minutes | Kernel tuning, boot recovery, incident walkthroughs, design trade-offs |
If you are short on time, do not skip Week 6. A candidate who has practised explaining four or five incidents clearly usually does better than one who has memorised a long list of commands.
Set up your practice lab (day 0)
You need a Linux machine you are allowed to break. Two options cover most people:
- A local virtual machine. Install VirtualBox, VMware Workstation or the built-in Hyper-V, then install a RHEL-compatible distribution and an Ubuntu Server VM. Red Hat offers a no-cost Red Hat Developer subscription for individuals that includes RHEL. Add a second virtual disk of a few GB to each VM; you will need it in Week 4.
- A small cloud instance. Any free-tier or low-cost instance works for weeks 1 to 3. For storage and boot recovery practice, a local VM is easier because you can attach disks and use the console freely.
Take a snapshot after installation so you can roll back after the deliberate breakage in later weeks. Our beginner's guide to setting up RHEL 10 walks through a first install.
The six-week plan at a glance
| Week | Topic | Lab you must finish | Typical interview questions it prepares you for |
|---|---|---|---|
| 1 | Shell, filesystem, text processing | Find the 10 largest files under /var and the 5 most frequent IP addresses in a log | Hard vs soft links, grep/awk/sed, redirection, pipes |
| 2 | Users, groups, permissions, packages | Create a shared project directory that only one group can write to | chmod numbers, umask, setgid, sudo, dnf vs apt |
| 3 | Processes, systemd, logs, scheduling | Write a systemd service for a script, enable it, and read its logs | Signals, zombie processes, journalctl, cron vs timers |
| 4 | Storage: partitions, LVM, filesystems | Create an LVM volume, mount it through /etc/fstab, then extend it online | Disk full scenarios, inodes, fstab mistakes |
| 5 | Networking, SSH, firewall, SELinux, scripting | Serve a web page on a non-standard port with firewalld and SELinux both enforcing | DNS debugging, open ports, SSH hardening, SELinux denials |
| 6 | Troubleshooting drills and mock interviews | Recover from five deliberately broken VMs without looking at notes | Scenario rounds and "tell me about an incident" |
Week 1: Shell, filesystem and text processing
Goal: move around the system and process text without reaching for a GUI. Interviewers often open with these topics because answers reveal quickly whether a candidate uses Linux daily.
What to study
- The filesystem hierarchy: what lives in
/etc,/var,/usr,/home,/procand/tmp. - Navigation and files:
ls -l,cd,cp,mv,rm,find,lnandstat. - Redirection and pipes:
>,>>,2>,2>&1and|. - Text tools:
grep,cut,sort,uniq,wc,awk,sed,head,tail -fandless. - Getting help:
man,--helpandapropos.
Daily labs
# Ten largest files under /var (errors from unreadable paths hidden)
sudo find /var -type f -printf '%s %p\n' 2>/dev/null | sort -rn | head -10
# Five most frequent client IPs in a web access log
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -5
# Replace a value in a config file, keeping a backup copy
sed -i.bak 's/^Port 22$/Port 2222/' sshd_config.test
Practise the commands from our list of top 20 Linux commands for DevOps engineers until you can type each one with a useful option from memory.
Week 2: Users, permissions and packages
Goal: explain the permission model clearly and manage users and software safely. Permission questions are common at every level because mistakes here cause both outages and security incidents.
What to study
useradd,usermod -aG,passwd,userdel,groupadd, and the files/etc/passwd,/etc/shadowand/etc/group.- Read, write and execute for user, group and others; numeric and symbolic
chmod;chown;umask. - Special bits: setuid, setgid on directories and the sticky bit on
/tmp. - Access control lists with
setfaclandgetfacl. sudoand editing rules safely withvisudo.- Packages:
dnfandrpmon RHEL-family systems,aptanddpkgon Debian and Ubuntu.
Lab
sudo groupadd devteam
sudo useradd -m -G devteam asha
sudo mkdir -p /srv/project
sudo chgrp devteam /srv/project
sudo chmod 2770 /srv/project # setgid: new files inherit the devteam group
ls -ld /srv/project # expect drwxrws---
Read our explainers on the sticky bit and the /etc/shadow file after this lab.
Week 3: Processes, systemd, logs and scheduling
Goal: start, stop, inspect and debug services. Almost every scenario question in a DevOps interview involves a service that will not start or stay running.
What to study
ps aux,top,pgrep,killand the common signals (SIGTERM 15, SIGKILL 9, SIGHUP 1).- Process states, including zombie and uninterruptible sleep (D state).
systemctl start|stop|restart|status|enable|disable, unit files andsystemctl daemon-reload.journalctl -u name,-b,-fand--since.- cron syntax and systemd timers.
Lab
# /etc/systemd/system/heartbeat.service
[Unit]
Description=Write a heartbeat line every 30 seconds
[Service]
ExecStart=/usr/local/bin/heartbeat.sh
Restart=on-failure
User=nobody
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now heartbeat.service
systemctl status heartbeat.service
journalctl -u heartbeat.service -n 20
Then break it on purpose: make the script non-executable, and read what systemctl status and the journal tell you.
Week 4: Storage, LVM and filesystems
Goal: add a disk, put LVM on it, mount it permanently and grow it. "Disk full" is probably the single most common Linux scenario question.
What to study
lsblk,blkid,fdiskorparted,df -h,df -ianddu -sh.- LVM: physical volumes, volume groups and logical volumes;
pvcreate,vgcreate,lvcreateandlvextend -r. - XFS and ext4:
mkfs.xfs,xfs_growfsandresize2fs. XFS can grow but not shrink. /etc/fstabfields, UUIDs, and checking entries withfindmnt --verifyandmount -abefore a reboot.- Swap:
mkswap,swaponandfree -h.
Lab
sudo pvcreate /dev/sdb
sudo vgcreate vgdata /dev/sdb
sudo lvcreate -n lvapp -L 1G vgdata
sudo mkfs.xfs /dev/vgdata/lvapp
sudo mkdir /app
echo "UUID=$(sudo blkid -s UUID -o value /dev/vgdata/lvapp) /app xfs defaults 0 0" | sudo tee -a /etc/fstab
sudo findmnt --verify && sudo mount -a
sudo lvextend -r -L +500M /dev/vgdata/lvapp # grow volume and filesystem together
For background, read how LVM improves storage flexibility.
Week 5: Networking, SSH, firewall, SELinux and scripting
Goal: debug connectivity layer by layer and keep security controls switched on while you do it.
What to study
ip addr,ip route,ss -tulpn,ping,curl -v,digand/etc/hosts.- NetworkManager with
nmclion RHEL-family systems. - SSH keys,
ssh-copy-id, and hardeningsshd_config(key-only login, no direct root login). firewall-cmdzones, services, ports and--permanentwith--reload.- SELinux modes, contexts,
ls -Z,restorecon,semanage portand reading denials withausearch -m AVC. - Bash scripting: variables, quoting,
if, loops, exit codes andset -euo pipefail.
Lab
sudo dnf install -y httpd
sudo sed -i 's/^Listen 80$/Listen 8081/' /etc/httpd/conf/httpd.conf
sudo semanage port -a -t http_port_t -p tcp 8081
sudo firewall-cmd --permanent --add-port=8081/tcp
sudo firewall-cmd --reload
sudo systemctl enable --now httpd
curl -I http://localhost:8081
Do this with SELinux in enforcing mode. If httpd fails to start before the semanage step, you have just seen one of the most common interview scenarios first hand. Our SELinux in RHEL 10 guide explains contexts and booleans.
Week 6: Troubleshooting drills and mock interviews
Goal: answer scenario questions calmly with a repeatable method. Ask a friend to break your VM while you are away, or break it yourself and wait a day before fixing it.
Five drills to run
- Fill
/appwith a large file, delete it while a process still holds it open, and explain whydfanddudisagree. - Add a typo to
/etc/fstab, reboot, and recover from emergency mode. - Change a service to listen on an unlabelled port and fix the SELinux denial without disabling SELinux.
- Remove the default route and restore connectivity with
ip routeandnmcli. - Run a CPU-heavy loop and find it with
top, then explain load average versus CPU usage.
How to answer a scenario aloud
Use the same four steps every time: what you observe, what you check and why, the fix, and how you would prevent it from happening again. The scenario-based Linux questions page has more than twenty full walk-throughs to practise with, and our real-time Linux interview questions for experienced engineers cover production incidents.
Weekly checkpoint questions
Answer each one aloud without notes. The answers are short on purpose; if you need more than a minute, revisit that week's labs.
Checkpoints for freshers (weeks 1 and 2)
1. What is the difference between a hard link and a symbolic link?
A hard link is another directory entry that points to the same inode, so it keeps working if the original name is deleted, but it cannot cross filesystems or point to a directory. A symbolic link is a small file holding a path; it can cross filesystems but breaks if the target is removed.
2. What does 2>&1 do?
It sends standard error (file descriptor 2) to wherever standard output (file descriptor 1) currently points. In cmd > out.log 2>&1 both streams end up in the file. The order matters: cmd 2>&1 > out.log leaves errors on the terminal.
3. What does chmod 750 script.sh mean?
The owner gets read, write and execute (7), the group gets read and execute (5), and others get nothing (0).
4. What is a umask?
It removes permission bits from the defaults when files and directories are created. With a umask of 022, new files are created as 644 and new directories as 755.
5. Why set the setgid bit on a shared directory?
New files and subdirectories inherit the directory's group instead of the creator's primary group, so everyone in the team group keeps access.
6. Where are password hashes stored, and who can read them?
In /etc/shadow, which only root can read. /etc/passwd is world-readable and holds account details but not the hashes.
7. How do you add an existing user to a supplementary group without removing other groups?
usermod -aG groupname username. Without -a, -G replaces the user's supplementary groups.
8. How do you find which package owns a file?
rpm -qf /path/to/file on RHEL-family systems, or dpkg -S /path/to/file on Debian and Ubuntu.
9. How do you search recursively for a string and show line numbers?
grep -rn "pattern" /path. Add -i to ignore case.
10. How do you follow a log file as it grows?
tail -f file, or tail -F if the file may be rotated. For systemd services, journalctl -u name -f.
Checkpoints for 2 to 5 years of experience (weeks 3 to 5)
11. What is the difference between SIGTERM and SIGKILL?
SIGTERM (15) asks a process to exit and lets it clean up; it can be caught or ignored. SIGKILL (9) is handled by the kernel, cannot be caught, and stops the process immediately, so open work may be lost. Send SIGTERM first.
12. What is a zombie process and how do you get rid of it?
A process that has exited but whose parent has not yet collected its exit status. You cannot kill a zombie; you fix or restart the parent, after which the zombie is reaped.
13. What is the difference between systemctl enable and systemctl start?
start runs the unit now. enable makes it start at boot. enable --now does both.
14. You edited a unit file and the change has no effect. Why?
systemd caches unit files. Run systemctl daemon-reload, then restart the service.
15. How do you see logs for one service since the last boot?
journalctl -u name -b. Add -p err to show only errors and above.
16. How do you grow an XFS filesystem on LVM while it is mounted?
lvextend -r -L +5G /dev/vg/lv, which extends the volume and calls the filesystem resize. Without -r, run xfs_growfs /mountpoint afterwards. XFS cannot be shrunk.
17. df -h shows free space but you cannot create files. What do you check?
Inodes, with df -i. Millions of small files can use up every inode while blocks remain free.
18. How do you see which process is listening on a port?
ss -tulpn (run with sudo to see process names), filtered with grep for the port.
19. How do you open a port permanently with firewalld?
firewall-cmd --permanent --add-port=8081/tcp followed by firewall-cmd --reload. Without --permanent the rule is lost on reload or reboot.
20. How do you find out why SELinux blocked something?
Search the audit log with ausearch -m AVC -ts recent, or use sealert if setroubleshoot is installed. Fix the context, port label or boolean; do not switch SELinux off.
21. What does set -euo pipefail do in a Bash script?
-e exits on an unhandled error, -u treats unset variables as errors, and pipefail makes a pipeline fail if any command in it fails, not only the last.
Checkpoints for senior engineers
22. Load average is high but CPU usage is low. What does that suggest?
On Linux, load average counts processes waiting on CPU and processes in uninterruptible sleep, usually waiting for disk or network storage. Check I/O wait in top, then iostat -x and vmstat, and look for processes in D state.
23. How would you recover a server that boots into emergency mode after an fstab change?
Log in with the root password at the emergency prompt, remount root read-write if needed, fix or comment out the bad line, run findmnt --verify and mount -a, then reboot. Prevent it by testing fstab changes before rebooting and using nofail for non-critical mounts.
24. How do you make a kernel parameter change persistent?
Put it in a file under /etc/sysctl.d/ and apply it with sysctl --system. sysctl -w alone is lost at reboot.
25. How do you limit the resources a service can use?
With systemd resource controls in the unit or a drop-in, for example MemoryMax= and CPUQuota=, which systemd enforces through cgroups. Use systemctl edit name to create the drop-in.
26. How would you harden SSH on an internet-facing server?
Allow key-based login only, disable direct root login, restrict which users or groups can log in, keep the OpenSSH package patched, and limit source addresses with the firewall where possible. Validate with sshd -t before restarting, and keep a second session open while you test.
Scenario checkpoints (week 6)
27. The disk is 100% full but du totals much less. What happened?
A deleted file is still held open by a running process, so its space is not released. Find it with lsof +L1 or lsof | grep deleted, then restart the process or truncate the file through /proc/PID/fd. Prevent it with proper log rotation.
28. A service starts by hand but is not running after a reboot. Why?
It is probably not enabled, or it starts before a dependency such as the network or a mount is ready. Check systemctl is-enabled and the journal for that boot, and add After= and Wants= or a mount dependency to the unit.
29. A host can ping an IP address but not a hostname. Where do you look?
Name resolution: /etc/resolv.conf (or resolvectl status on systems using systemd-resolved), /etc/nsswitch.conf and /etc/hosts. Test with dig name against the configured server and a known public resolver.
30. A web server returns "permission denied" for files that have correct Unix permissions. What is the likely cause?
The files have the wrong SELinux context, often because they were moved rather than copied into the web root. Check with ls -Z, fix with restorecon -Rv /path, and add a permanent rule with semanage fcontext for custom paths.
Mock interview checklist
| Round | What to rehearse | How to practise |
|---|---|---|
| Screening call | Two-minute summary of your Linux work and the distributions you know | Record yourself and cut anything vague |
| Command round | Typing commands live with the right options | Have a friend call out tasks; answer on a VM with screen sharing |
| Scenario round | Observe, check, fix, prevent | Five drills from week 6, explained aloud |
| Incident story | One real or lab incident, told with timeline and lesson | Write it down in under 200 words first |
| Questions for them | Which distributions, how changes are deployed, on-call expectations | Prepare three questions |
Where to go next
Once you finish the plan, test yourself against larger question sets: 60+ most asked Linux interview questions for fundamentals and advanced Linux interview questions for DevOps for senior topics. If you prefer guided labs with an instructor, our Linux administration training runs in our Kharadi, Pune classroom and live online, and the RHCSA training follows the Red Hat exam objectives. Our RHCSA on RHEL 10 guide explains the exam itself.
Frequently asked questions
How long does it take to prepare for a Linux interview?
About six weeks at 90 minutes a day for a fresher, following a plan like the one above. Experienced engineers often need two to three weeks, mostly spent on scenarios and incident stories.
Which Linux distribution should I practise on?
Practise on one RHEL-compatible distribution and on Ubuntu. Most enterprise job descriptions in India mention one of these families, and the main differences you need to know are package managers, firewall tools and default security modules.
Do I need a certification to get a Linux job?
No, but a hands-on certification such as Red Hat's RHCSA (EX200) shows you can do the tasks under exam conditions. Check Red Hat's exam page for current objectives and pricing.
What Linux topics come up most in DevOps interviews?
Permissions, systemd services and logs, disk space problems, networking and DNS checks, SSH, and shell scripting. Senior roles add performance analysis, SELinux and boot recovery.
Is it enough to memorise interview questions?
No. Interviewers follow up on every answer, and scenario rounds need you to reason through a problem you have not seen. Use question lists to find gaps, then close them with labs.
Can I practise Linux on Windows?
Yes. WSL is fine for weeks 1 and 2, but use a full virtual machine for systemd, storage, firewall and boot recovery labs, because those need a complete system you can reboot and break.
References
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0