Linux Administrator Interview Questions (2026) and How to Answer
By FindAJobAI Team Updated How we wrote this page
Linux administrator interviews go deeper into the operating system than a general sysadmin loop. Expect questions on systemd, boot, LVM, SELinux, packages and automating changes across many hosts.
Interviewers listen for a methodical habit: read logs, test on one host, then roll out carefully.
Below: 30 questions with what each one really asks and an answer outline, full sample answers to the 10 most asked, red flags to avoid and a 7-day plan.
Answering with STAR
Tell each story in four steps: the situation in a sentence, your task, the actions you took (most of the answer) and the result, with a number if you have one. Aim for about two minutes; the outlines show what to include, the details must be yours.
Behavioural questions (1–10)
How you've handled real situations. Answer each with one true story, in STAR order.
1.Tell me about a Linux host you brought back after it refused to boot.
What they're really asking: Can you work through a failed boot without panicking or rebuilding blindly?
Answer outline (STAR)
- SituationA production server stuck in emergency mode after a kernel update or fstab change.
- TaskGet the host running again and understand exactly what broke.
- ActionUse the console or rescue target, read the journal from the failed boot, fix the unit, mount or kernel entry.
- ResultDowntime in minutes, and the safeguard added so the same change cannot strand a host again.
Full sample answer (fictional example)
After a routine patch night, one of our RHEL 8 file servers dropped into emergency mode. I connected through the out-of-band console, ran journalctl -xb and saw a mount timing out. Someone had added an NFS export to fstab the week before without the nofail option, and the NFS server had rebooted later than this host. I commented out the line, booted normally, and service was back in about 25 minutes. Then I changed every network mount in our Ansible template to use nofail and a systemd automount, so a slow share could never block a boot again.
2.Describe a time you automated a task you used to do by hand on every server.
What they're really asking: Do you turn repeated shell work into something reviewed and repeatable?
Answer outline (STAR)
- SituationUser creation, SSH key rotation or agent installs typed into each host one at a time.
- TaskMake the change consistent across the whole fleet.
- ActionWrite an Ansible role or script, test it on a lab host and a small canary group, then roll it out in waves.
- ResultHours saved per month, and the drift that stopped.
Full sample answer (fictional example)
When I joined, new admin accounts were added by hand on about 250 servers, and leavers were sometimes missed for weeks. I wrote an Ansible role that read a single YAML list of admins with their SSH keys and sudo group, and removed anyone not on it. I tested it on lab hosts, then on ten canary servers, before rolling it out. Onboarding an admin went from half a day to one merge request, and offboarding became the same single change.
3.Tell me about a time a patch or package update broke an application.
What they're really asking: Can you roll back cleanly and stop the same patch hurting more hosts?
Answer outline (STAR)
- SituationA library or kernel update that crashed a service after a routine patch run.
- TaskRestore the service and protect the rest of the fleet.
- ActionPause the rollout, downgrade or pin the package with dnf history or apt, confirm the fix with the app owner.
- ResultHow many hosts were affected, and the canary step that became standard.
Full sample answer (fictional example)
We pushed an OpenSSL update to our first wave of 60 Ubuntu hosts, and an older payment integration started failing its TLS handshakes. I paused the remaining waves straight away so the other 300 hosts were untouched. I used the apt history log to confirm the exact package versions, pinned the previous version with apt-mark hold on the affected hosts, and the integration recovered within 20 minutes. I then worked with the app team, who found the client library needed an upgrade. The lasting change was a rule that every patch wave waits a full business day after the canary group.
4.Tell me about disagreeing with a developer about how a server should be configured.
What they're really asking: Can you hold a security or stability line while still helping the team ship?
Answer outline (STAR)
- SituationA request to disable SELinux, open a port widely or run a service as root.
- TaskMeet the developer's real need without weakening the host.
- ActionAsk what is failing, reproduce it, write the narrow policy or rule that allows only what is needed.
- ResultThe app shipped on time, and the setting that stayed secure.
Full sample answer (fictional example)
A developer wanted SELinux disabled on our app servers because his new upload feature kept failing in staging. I asked him to reproduce it with me, and the audit log showed the web process being denied writes to a new upload directory. The directory simply had the wrong context. I added a semanage fcontext rule for that path, ran restorecon, and the feature worked within the hour. He was relieved it was a one-line fix, and the servers stayed in enforcing mode, which mattered for our PCI scope.
5.Describe the worst on-call night you have had as a Linux admin.
What they're really asking: Do you stay methodical and communicate while tired and under pressure?
Answer outline (STAR)
- SituationA cascading failure such as full disks or a broken NFS share taking several services down.
- TaskRestore critical services first and keep people informed.
- ActionTriage by impact, fix the cause on one host, apply it everywhere, post updates.
- ResultTime to recovery, and the follow-up fixes.
Full sample answer (fictional example)
At 2 a.m. I was paged for six services down at once. The shared NFS server had filled its disk, and every client that wrote logs to it hung. I posted a short status in the incident channel, then found a debug log that had grown to 900 GB overnight. I truncated it rather than deleting it, so the open handle released the space, and the clients recovered within ten minutes. Over the next week I added quotas on that export, moved application logs to local disk with central shipping, and set an alert at 80 percent use.
6.Tell me about moving a fleet off an end-of-life distribution.
What they're really asking: Can you plan a long migration against a hard deadline?
Answer outline (STAR)
- SituationHundreds of CentOS 7 or Ubuntu 18.04 hosts approaching the end of security updates.
- TaskMove every workload before support ended without breaking applications.
- ActionInventory hosts and owners, choose in-place upgrade or rebuild per role, migrate in waves with app sign-off.
- ResultHosts moved, weeks to spare, and the one dependency that nearly delayed it.
7.Describe a time you found a security problem on a Linux host before an auditor did.
What they're really asking: Are you scanning your own estate, not waiting to be told?
Answer outline (STAR)
- SituationWorld-writable files, an old sudo rule or a forgotten service listening on all interfaces.
- TaskClose the gap across every host, not just the one you spotted.
- ActionConfirm the scope with a scan, fix it through configuration management, add a check that fails builds.
- ResultHosts fixed, and whether the next audit came back clean.
8.Tell me about teaching Linux skills to a colleague or another team.
What they're really asking: Do you share knowledge, or does everything depend on you?
Answer outline (STAR)
- SituationA developer or junior admin who kept escalating basic shell tasks.
- TaskHelp them handle routine work alone.
- ActionPair on real tickets, write short how-to notes, review their first few changes.
- ResultEscalations that dropped off, and what they handle alone now.
9.Tell me about a performance problem you traced to the operating system.
What they're really asking: Can you move past the app team's first guess and find the real cause?
Answer outline (STAR)
- SituationAn app blamed for slowness that was actually swap, I/O scheduling or a kernel setting.
- TaskProve the cause and fix it without guesswork.
- ActionMeasure with vmstat, iostat and sar, change one setting at a time, compare before and after.
- ResultLatency before and after, and the baseline you saved for next time.
10.Describe a change you pushed back on or delayed because the risk was too high.
What they're really asking: Can you say no to a rushed change and offer a safer route?
Answer outline (STAR)
- SituationA request to change a core library or kernel parameter on every host on a Friday.
- TaskProtect stability while still meeting the business need.
- ActionExplain the risk, propose a test on staging and a canary group, agree a new date.
- ResultThe change landed safely, and how the requester felt about it later.
Technical and role-skill questions (11–22)
Can you do the work itself? Think out loud and name the trade-offs.
11.Walk me through what happens when a modern Linux server boots, from firmware to login prompt.
What they're really asking: Shows whether you can locate where a boot failure lives.
Answer outline
- Firmware hands off to GRUB2, which loads the kernel and the initramfs that mounts the real root filesystem.
- The kernel starts systemd as PID 1, which brings up targets and units in dependency order until the default target is reached.
Full sample answer (fictional example)
Firmware, either BIOS or UEFI, finds the boot loader, which on most servers I've run is GRUB2. GRUB loads the kernel and the initramfs into memory. The initramfs holds just enough drivers and tools to find and mount the real root filesystem, including LVM or encrypted volumes. Once root is mounted, the kernel starts systemd as PID 1. Systemd then works through units and targets in dependency order, mounting filesystems from fstab, starting networking and services, until it reaches the default target, usually multi-user.
12.A service will not start under systemd. How do you investigate?
What they're really asking: Everyday skill that separates real hands-on time from reading.
Answer outline
- Check systemctl status for the exit code, then journalctl -u for the full log around the failure.
- Verify the unit file, the user it runs as, file permissions and any SELinux denials in the audit log.
13.How would you grow a logical volume and its filesystem on a live server?
What they're really asking: Tests your storage confidence on live production systems.
Answer outline
- Add or extend a physical volume, extend the volume group, then lvextend the logical volume.
- Grow the filesystem with xfs_growfs or resize2fs; XFS can grow online but cannot shrink.
Full sample answer (fictional example)
First I'd check whether the volume group has free extents with vgs. If not, I'd add a disk or grow the virtual disk, run pvresize or pvcreate, and vgextend the group. Then I'd extend the logical volume with lvextend, and I usually pass the -r flag so it grows the filesystem in the same step. For XFS, which is the RHEL default, growing works online with xfs_growfs; ext4 can grow online with resize2fs too. Before any resize I confirm a recent backup, because XFS can't be shrunk afterward.
14.SELinux is blocking an application. What do you do instead of disabling it?
What they're really asking: A common test of whether you take hardening seriously.
Answer outline
- Read the AVC denials with ausearch or sealert to see exactly which access was refused.
- Fix file contexts with semanage fcontext and restorecon, set a boolean, or build a small custom module as a last resort.
Full sample answer (fictional example)
I start by confirming SELinux is actually the cause, by checking the audit log with ausearch -m avc for recent denials. If I see them, I read what source context tried to do what to which target. Most of the time the fix is a wrong file label, so I add a persistent rule with semanage fcontext and apply it with restorecon. Only when a label fix doesn't apply would I build a small custom module with audit2allow, and I'd review that module line by line. I've never needed to turn SELinux off on a production host.
15.How do you find out which process is holding a port or a deleted file open?
What they're really asking: Checks practical troubleshooting tools you know beyond top.
Answer outline
- Use ss -tlnp or lsof -i to map a listening port to a process ID.
- Use lsof +L1 to find deleted files still holding disk space until the process restarts.
16.Compare package management on RHEL-family and Debian-family systems.
What they're really asking: Most fleets mix distros, so interviewers want comfort with both.
Answer outline
- RHEL family uses rpm and dnf with repos defined in yum.repos.d, and dnf history allows undo of a transaction.
- Debian family uses dpkg and apt with sources lists, and apt-mark hold pins a package version.
17.How would you set up SSH access for a team of twenty admins securely?
What they're really asking: Tests access-control judgement, not just sshd syntax.
Answer outline
- Key-only authentication, root login disabled, and named accounts with sudo rules per role.
- Central identity such as FreeIPA or LDAP, plus logging of sudo use, so leavers are removed in one place.
18.What is the difference between a process's nice value and its cgroup limits?
What they're really asking: Tests resource control knowledge on shared hosts.
Answer outline
- Nice only changes scheduling priority among competing processes and does not cap usage.
- Cgroups, set through systemd slices or unit options, hard-limit CPU, memory and I/O for a group.
19.How do you make a configuration change survive a reboot, such as a sysctl or a mount?
What they're really asking: Checks that fixes are permanent, not just live.
Answer outline
- Put kernel parameters in a file under /etc/sysctl.d and reload with sysctl --system.
- Add mounts to fstab or a systemd mount unit, then test with mount -a before rebooting.
20.Explain inodes and what happens when a filesystem runs out of them.
What they're really asking: A classic gap that causes confusing write errors.
Answer outline
- Each file uses one inode, so millions of tiny files can exhaust inodes while space remains.
- Check with df -i, then find and clean the directory full of small files, such as session or cache files.
21.How would you build a new server so it matches the rest of the fleet exactly?
What they're really asking: Tests repeatable builds rather than hand-tuned machines.
Answer outline
- Start from a kickstart, cloud-init or golden image with the base packages pinned.
- Apply the same configuration management roles every host gets, then verify with a compliance scan.
22.What does a reverse proxy like Nginx or HAProxy add in front of a Linux app server?
What they're really asking: Many Linux admin roles own the web tier too.
Answer outline
- TLS termination, load balancing across several back ends and health checks that drop failed nodes.
- Caching, rate limits and a single place to log and filter incoming traffic.
Take-home or live exercise: tips
Many Linux administrator loops include a hands-on task: a broken VM to repair or a short Bash or Ansible exercise.
- Say each command before you run it and what you expect to see, so the interviewer follows your reasoning.
- Check logs and status first; resist reinstalling packages or rebooting until you have a theory.
- In a scripting task, quote variables, check exit codes and handle a missing file or empty input.
Situational questions (23–30)
Scenarios that test judgement: say what you'd do first, and why.
23.A filesystem shows 100% used but du only accounts for half of it. What is happening?
What they're really asking: Checks whether you know the classic deleted-but-open file trap.
Answer outline
- A process is likely still holding deleted files open, often a log that was removed instead of rotated.
- Find it with lsof +L1, then restart or signal the process so the space is released.
Full sample answer (fictional example)
I've seen this most often when someone deletes a large log file while the service writing to it is still running. The directory entry is gone, so du doesn't count it, but the process still holds the file open and the blocks stay allocated. I'd run lsof +L1 to list deleted files that are still open, along with the process ID and size. The fix is to restart or reload that process so it releases the handle, or truncate the file through the proc filesystem if a restart isn't safe.
24.You are asked to apply an urgent kernel patch to 400 hosts by tomorrow. How do you plan it?
What they're really asking: Can you move fast without risking the whole fleet at once?
Answer outline
- Patch a small canary group first, reboot, and confirm services and monitoring look normal.
- Roll out in waves grouped by service, with a rollback kernel kept in GRUB.
25.Load average on a database host jumps to 40 but CPU usage looks low. What do you check?
What they're really asking: Do you understand what load average actually measures?
Answer outline
- High load with idle CPU usually means processes waiting on I/O, so check iostat and iowait.
- Look for a failing disk, a saturated SAN path or an NFS mount that stopped responding.
26.An admin who just left the company had root on every server. What do you do in the first hour?
What they're really asking: Tests your offboarding discipline when privileged access is involved.
Answer outline
- Disable the central account and remove their SSH keys everywhere with automation, not by hand.
- Rotate shared secrets they could reach and review recent sudo and login logs.
27.Monitoring shows swap use climbing on a web server every afternoon. What do you do?
What they're really asking: Do you investigate a slow trend before it becomes an outage?
Answer outline
- Identify the process growing in memory with ps or smem and compare across days.
- Check for a leak, a worker count set too high, or a cron job that overlaps the busy period.
28.A developer asks for passwordless sudo on production to speed up deploys. How do you respond?
What they're really asking: Can you meet a real need without handing out broad root access?
Answer outline
- Ask which commands the deploy actually runs and allow only those through a narrow sudo rule.
- Better still, move the deploy into a pipeline account that is logged and reviewed.
Full sample answer (fictional example)
I'd start by asking what the deploy actually needs to do as root, because usually it's two or three commands, like restarting a service or writing to one directory. I'd offer a sudo rule that allows exactly those commands for a deploy group, with logging, rather than full root without a password. If the team is deploying often, I'd suggest moving it into the CI pipeline with a dedicated service account, so no person needs root at all for routine releases.
29.A backup restore test shows files coming back with the wrong owners and permissions. What now?
What they're really asking: Tests attention to detail in recovery, not just copying data.
Answer outline
- Check whether the backup tool preserves ownership, ACLs and SELinux labels, and how it runs.
- Fix the job options, rerun the test restore and document the verified procedure.
30.A cron job that ran fine for years suddenly fails after a server migration. Where do you start?
What they're really asking: Can you spot environment differences that break old scripts?
Answer outline
- Compare the PATH, shell, user and environment variables cron uses on the new host.
- Check for changed paths, missing packages or a timer that replaced cron on the new build.
Red flags to avoid in your answers
Each one is quick to fix before the day.
Says the first step for any SELinux problem is setenforce 0.
Explain how you read AVC denials and fix contexts or booleans while staying in enforcing mode.
Cannot describe the boot sequence or where to look when a host hangs.
Learn GRUB, initramfs and systemd targets well enough to name the tool you would use at each stage.
Makes changes by hand on each server with no record.
Describe how your changes go through Ansible, Puppet or at least a tracked script and change ticket.
Talks about patching everything at once with no canary group.
Walk through waves, a test group, rollback kernels and how you decide to continue or stop.
How to prepare for a Linux administrator interview in 7 days
An hour or two a day is enough; the order matters more than the length.
Day 1: Boot and systemd drills
Break a lab VM's fstab and a unit file, then recover both from the console while writing down each command you used.
Day 2: Storage and LVM practice
Create, extend and snapshot logical volumes, grow XFS and ext4 online, and practise reading df and df -i output.
Day 3: SELinux without shortcuts
Trigger an AVC denial on purpose, read it with ausearch, and fix it with semanage fcontext and restorecon.
Day 4: Ansible role from scratch
Write a small role that manages users, SSH settings and a service, run it twice and confirm the second run changes nothing.
Day 5: Shell stories in STAR form
Draft STAR stories for a failed boot, a bad patch and a late-night outage, each with a host count and recovery time.
Day 6: Distro and tooling gaps
Review dnf and apt history, ss, lsof and iostat for any distro named in the posting that you use less often.
Day 7: Live shell rehearsal
Have a friend break a VM in a way you do not know about, fix it while narrating aloud, then rest for the evening.
Questions to ask the interviewer
Pick two or three; the answers tell you whether you want the job.
- Which distributions and major versions run in production today, and are any near end of life?
- How is configuration managed: Ansible, Puppet, Salt, or mostly by hand?
- What does a typical on-call week look like, and how many pages does it bring?
- How are kernel and security patches scheduled and approved here?
- Which part of the Linux estate does the team most want to clean up next?
Preparation tips
- Practise fixing a broken VM aloud: a bad fstab, a failed unit, a full disk.
- Know your way around journalctl, ss, lsof, iostat and dnf or apt history without looking them up.
- Prepare one automation story with the number of hosts and the time it saved.
Prepare the general questions too: tell me about yourself, why do you want to work here? and why are you leaving? Afterwards, send a thank-you email; when the offer comes, negotiate the salary.
How we wrote this page
The FindAJobAI team wrote the questions, outlines and sample answers for Linux administrator interviews. The people, employers and numbers in the samples are invented: copy the structure, and use details from your own work.
Once we track enough live Linux administrator job ads, this page also shows the skills they ask for most, counted the same way as our in-demand skills report.
Last reviewed on November 1, 2026.