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.

MediumTechnical
19 practiced

Write a Bash function that creates a secure temporary directory, sets permissions so only the owner can access it, and registers a trap to remove it on EXIT. Provide the function and an example of how to use it in a script safely handling spaces in filenames.

EasyTechnical
20 practiced

Explain the purpose and contents of /etc/passwd, /etc/shadow, and /etc/group. Given a sample line from /etc/passwd and /etc/shadow, identify which field stores the password hash, the UID, GID, home directory and shell. What permissions should these files have and why?

MediumTechnical
20 practiced

You must configure log rotation for application logs at /var/myapp/log/*.log to: rotate daily, compress rotated logs, keep 7 rotations, and ensure the application continues writing to the new log file without losing messages. Provide a complete /etc/logrotate.d/myapp config and explain whether to use copytruncate or a postrotate signal to the process. Also describe how you'd centralize these logs securely to an ELK/Graylog stack from the fleet.

EasyTechnical
16 practiced

Describe the standard Linux process states (R, S, D, Z, T) and their meanings. For each state explain typical causes, how a process transitions into and out of that state, and which tools and command flags you would use to observe that state on a running system (examples: ps, top). Also explain what it means if many processes stay in one state for a long time.

EasyTechnical
20 practiced

Explain package management on Linux distributions: how apt/dpkg and dnf/rpm work at a high level, how to add and verify package repository GPG keys, how to hold/pin package versions, and strategies for safe kernel/package upgrades in production, including rollback approaches.

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.