Linux system administrator interview questions and answers
Linux system administrator interview questions focus on running many servers safely over time: patching without outages, managing users and sudo access, growing storage with LVM, fixing SELinux denials, recovering a server that will not boot, and automating all of it with configuration management. Expect a technical screen, a practical or scenario round, and questions about on-call and change control. Interviewers hire the admin who checks before acting and leaves a fleet more consistent than they found it.
By Evin JohnPublished 8 min read
What a Linux system administrator does, and what teams screen for
A Linux system administrator keeps a set of servers patched, secure, monitored and recoverable, from a handful of machines in a small company to thousands of virtual machines. The work spans provisioning, access control, storage, backups, troubleshooting and automation, plus being on call when something breaks. The role overlaps with DevOps and site reliability work, but admin interviews put more weight on the operating system itself and on safe operational habits than on pipelines or application code.
- Distro depth: comfort with at least one family, RHEL and its rebuilds or Debian and Ubuntu, and awareness of how the other does things.
- Safe change habits: backups or snapshots before risky work, a tested rollback, and changes made through tickets and windows.
- Troubleshooting order: checking evidence first, logs and metrics, before restarting things.
- Automation: writing the fix once in Ansible, Puppet or similar rather than repeating it on fifty hosts by hand.
- Security sense: least privilege, audited access, prompt patching and not disabling SELinux to make a problem go away.
How the interview process usually runs
- Recruiter screenDistros, fleet size, virtualization or cloud platforms, on-call history and any certifications such as RHCSA, RHCE or LFCS.
- Technical screenRapid questions on boot, storage, permissions, services, networking and package management, often with a senior admin.
- Practical or scenario roundSome teams give a lab VM with broken services to fix; others talk through incidents out loud. Both judge the order of your checks.
- Automation and designHow you would build, patch and monitor a fleet, with a configuration management example from your own work.
- Behavioral and team fitOutages you handled, mistakes you made, how you communicate during incidents and how you document.
Patching, packages and access management
| Question | What it tests | What a strong answer shows |
|---|---|---|
| How do you patch 200 servers without an outage? | Change process | Group hosts into rings, patch a canary group first, drain or fail over clustered services, patch in maintenance windows, check health, then continue. Automation runs the steps; a person watches the first ring. |
| When does a server need a reboot after updates? | Kernel and libraries | New kernels need a reboot unless live patching is in use; updated shared libraries need dependent services restarted. Tools like needs-restarting on RHEL-family systems help decide. |
| dnf or yum versus apt: what differs in practice? | Distro breadth | RPM repositories and module streams on one side, deb packages and apt sources on the other. Both support holds or version locks, history and rollback in different ways. |
| How do you stop one package from upgrading? | Version pinning | dnf versionlock (a plugin on RHEL-family systems) or apt-mark hold, plus a ticket explaining why, so the hold does not live forever. |
| How do you give a developer limited root access? | sudo | A file in /etc/sudoers.d edited with visudo, allowing specific commands for a specific group, with logging. Not a shared root password. |
| How do you manage SSH keys across many servers? | Access at scale | Centralize: directory accounts through SSSD with LDAP or FreeIPA, or keys deployed by configuration management, and remove access when someone leaves on the same day. |
A user says sudo stopped working for them. What do you check? | Access debugging | Group membership and whether they logged in again since a change, the sudoers syntax, directory lookups through SSSD, and the secure or auth log for the exact denial. |
| How do you schedule a recurring job today? | cron versus timers | cron is still fine; systemd timers add logging in the journal, dependencies and catch-up after downtime with Persistent=true. |
| Why does time sync matter on servers? | chrony and NTP | Clock drift breaks TLS validation, Kerberos authentication, log correlation and distributed databases. Check chronyc tracking and alert on offset. |
Storage, boot and recovery questions
- How do you grow `/var` on a live server? If it is on LVM and the volume group has free space, extend the logical volume and the filesystem together. If not, add a disk, create a physical volume and extend the group first. Know that XFS can grow but not shrink.
- A server will not boot after someone edited `/etc/fstab`. What now? Use the console, boot into emergency or rescue mode, remount root read-write, fix or comment the bad line, and test with
mount -abefore rebooting. Prevent it withnofailfor non-critical mounts and by testing edits first. - How do you reset a lost root password? Interrupt the boot loader, boot into a minimal shell, remount root read-write, set the password, and on SELinux systems trigger a relabel so login works afterwards.
- A disk failed in a software RAID 1. Walk me through the replacement. Confirm which disk with
mdadm --detailand the serial number, mark it failed and remove it, swap the hardware, partition to match, add it back, and watch the rebuild. Make sure the boot loader is on both disks. - `df` says the disk is full but `du` cannot find the space. A process still holds a deleted file open. Find it with
lsof +L1, then restart or signal that service; truncating the file is a last resort. - What do you check before running `fsck`? That the filesystem is unmounted, which tool applies (XFS uses
xfs_repair), and that you have a backup or snapshot if the data matters. - An NFS mount hangs every command that touches it. Check the server and network path, look at mount options such as hard versus soft and timeouts, and use lazy unmount only when you understand what is still writing.
# Grow the logical volume by 20 GiB and resize its filesystem in one step
vgs # confirm free space in the volume group
lvextend -r -L +20G /dev/vg_data/lv_var # -r resizes ext4 or XFS too
df -h /var
# A web server returns 403 after content was moved into a new directory
ls -Z /srv/site # check the SELinux context
ausearch -m avc -ts recent # find the denial in the audit log
semanage fcontext -a -t httpd_sys_content_t "/srv/site(/.*)?"
restorecon -Rv /srv/site # apply the rule; survives a relabelSecurity and hardening questions
- SELinux is blocking an application. Do you set it to permissive? Only briefly on one host to confirm the cause, never as the fix. Read the AVC denial, correct file contexts or booleans, and write a small local policy only when nothing standard fits.
- How do you harden a freshly built server? Start from a baseline such as a CIS benchmark profile, remove unneeded packages and services, enforce key-based SSH, enable the host firewall, set up audit logging and automatic security updates where policy allows.
- firewalld, nftables or iptables? Know what your distro uses by default and how zones or rule sets persist across reboots. Explain how you would open one port to one subnet only.
- A TLS certificate on an internal service expired overnight. What do you change? Renew it now, then automate renewal (an ACME client or the internal CA's tooling) and add expiry monitoring weeks ahead.
- How do you find out who changed a config file? Configuration management history,
auditdwatches on sensitive paths, sudo logs and the change ticket. If none exist, that gap is the real finding. - A vulnerability scanner reports 300 findings. Where do you start? Internet-facing and actively exploited issues first, then by severity and reachability, and fix the image or template so new hosts do not repeat them.
Automation, monitoring and on-call questions
| Question | What it tests | What a strong answer shows |
|---|---|---|
| Show me something you automated with Ansible or Puppet. | Configuration management | Idempotent tasks, variables per environment, a dry run with check mode, and how the change was reviewed before it reached production. |
| Two servers built from the same template now behave differently. Why? | Drift | Manual changes since build. Detect drift with configuration management runs or file integrity checks, then bring hosts back to the declared state. |
| What do you monitor on every Linux host? | Observability | CPU saturation, memory and swap, disk space and inodes, disk latency, service health, time offset, certificate expiry and failed logins, with alerts that a person must act on. |
| Your pager goes off for disk at 90 percent at 3 a.m. What then? | On-call judgment | Check growth rate first: slow growth can wait for business hours, fast growth needs action now. Then fix the noisy alert so it predicts time-to-full instead of a fixed threshold. |
| How do you build new servers consistently? | Provisioning | A golden image or kickstart or preseed file plus configuration management, with nothing configured by hand after first boot. |
| How do you keep logs useful on a fleet? | Logging | Ship journald and syslog to a central store, keep retention matched to policy, and protect logs from the hosts' own administrators where audit rules require it. |
| Describe your change process for a risky kernel parameter change. | Change control | Test on a non-production host, write the rollback, change in a window, apply through configuration management, and watch metrics before widening it. |
Fictional example
- Interviewer
- Tell me about an outage you caused and what you changed afterwards.
- Candidate
- I pushed an Ansible change that added a new NFS mount to our application servers. I had tested it on two staging hosts where the NFS server was reachable. In production, one subnet could not reach it, and because the fstab line had no nofail option, four servers that rebooted for patching that night stopped in emergency mode. I got paged, used the console to comment out the line, and brought them back within about forty minutes. Afterwards I added nofail and a mount timeout to every non-critical network mount in the role, added a pre-flight check that tests reachability from each subnet before the mount task runs, and changed our patch runbook so the first ring reboots before the rest. I also wrote the incident up for the team, because two others had copied the same pattern.
Behavioral questions for Linux admins
- Tell me about the hardest production problem you have debugged.
- Describe a time you pushed back on a request because it was unsafe.
- How do you document a system so someone else can run it at night?
- Tell me about a manual task you eliminated and how you measured the time saved.
- How do you keep up with security advisories for the distros you run?
Use the story format from the behavioral question guide. Good admin stories end with a lasting change, such as a runbook, an alert or an automated check, not only with the server being back up.
A two-week preparation plan
- Days 1 to 3: build two VMs, one RHEL-family and one Debian-family, and do the same tasks on both: users, sudo rules, packages, services and timers.
- Days 4 to 6: practice storage: create LVM volumes, extend them, break fstab on purpose and recover from emergency mode.
- Days 7 and 8: turn SELinux to enforcing, break a web server with wrong contexts, and fix it from the audit log.
- Days 9 and 10: write an Ansible role that hardens a host and run it twice to prove it is idempotent.
- Days 11 and 12: set up basic monitoring and alerts, then write a runbook for a full disk and an expired certificate.
- Days 13 and 14: rehearse three incident stories and two automation stories aloud, with numbers you can defend.
For command-level drills, use Linux interview questions. If the job also covers Windows servers or Active Directory, read systems administrator interview questions, and if it leans toward pipelines and cloud, read DevOps engineer interview questions.
Scenario rounds reward a calm, ordered walk through your checks, and that order often slips when you say it aloud. Practicing with Natively, an AI interview assistant for Mac and Windows, gives you a transcript of each mock session on your own computer, so you can see whether you jumped to a restart before reading the logs. It can suggest answers live while a friend asks the questions, read a broken config or an error from a screenshot during practice, and with Pro or the free trial use the résumé and job description you provide. Your notes and past sessions stay saved to review.
Questions people ask
What questions are asked in a Linux system administrator interview?
Patching a fleet without outages, sudo and SSH key management, growing storage with LVM, recovering a server that will not boot, fixing SELinux denials, configuration management with Ansible or Puppet, monitoring and on-call scenarios.
How do I answer Linux admin scenario questions?
Say how you would gather evidence before acting, the safest fix, how you would roll back, and what you would automate or monitor so it does not happen again.
Do Linux admin interviews include a hands-on test?
Some do, using a lab VM with broken services to fix. Others ask you to talk through incidents. Both judge the order of your checks.
Which certifications help in a Linux administrator interview?
Certifications such as RHCSA, RHCE or LFCS show hands-on practice, but interviewers still test real troubleshooting and change habits.
Where to go next
Practice with the same assistant you would use on a call: it listens, transcribes and suggests answers from your own resume and the job description.
Facts on this page were last checked on . Product details come from the Natively app itself; if something here is out of date, tell us at hello@heynatively.com.
