Linux System Administration Questions

Operating and maintaining Linux and Unix systems: filesystems and permissions, process and service management, package management and updates, shell and scripting, storage, and network configuration on the host. Covers day-to-day administration, troubleshooting, monitoring and tuning host resource usage (CPU, memory, swap, and I/O), and hardening of Linux servers that underpin most infrastructure. The Linux operator's core skill set.

EasyTechnical
23 practiced

Provide a sed one-liner to replace all occurrences of the string foo with bar in place for all .conf files under /etc, making a backup with extension .bak. Explain the sed flags you used and how to test changes before mass-apply.

EasyTechnical
21 practiced

Write a Bash one-liner or a short Python script (specify which language you choose) that lists the top 5 processes by memory usage on a Linux server, outputting PID, user, RSS memory in MB, and command. This script will be used as a quick diagnostic during on-call shifts; state any assumptions about the environment.

MediumTechnical
16 practiced

Practical file operations: you're asked to move /var/www/myapp to /mnt/fast-storage while preserving permissions, ACLs, extended attributes, and SELinux contexts with minimal downtime. What commands or sequence would you use on a Linux host? Explain why you chose those commands and mention safety measures (verification, dry-run, backup).

EasyTechnical
19 practiced

A junior engineer asks you how to check disk usage and find the top 5 directories consuming space on a server. Provide the exact command(s) you would give (mention commonly available tools), and briefly explain how they work.

EasyTechnical
22 practiced

Explain umask and how it affects newly created files and directories. If the umask is 027, what are the default permissions for a newly created file and a newly created directory? How can umask be set for systemd services or persistently for interactive shells?

Unlock Full Question Bank

Get access to all 41 Linux System Administration interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.