DevOps Essential · 15 Questions

Top Linux & Bash Administration Interview Questions

Practical system administration and Bash scripting questions frequently asked during DevOps, SRE, and Backend engineering interviews.

Q1 Easy

How do you find all files modified within the last 24 hours in a directory?

Use the find command with the -mtime or -mmin option.

Solution Code
# Files modified in the last 24 hours (1 day)
find /var/www -type f -mtime -1

# Files modified in the last 60 minutes
find /var/www -type f -mmin -60
Q2 Medium

What is the difference between a Hard Link and a Soft (Symbolic) Link in Linux?

A Hard Link points directly to the file's underlying inode data on disk. If the original file is deleted, the hard link still accesses the file content. Hard links cannot span across different filesystems. A Soft (Symbolic) Link stores the filesystem path to the target file. If the original file is deleted, the symlink becomes broken (dangling link).

Q3 Medium

Explain what 'set -euo pipefail' does at the start of a Bash script.

This is the unofficial Bash 'strict mode': -e: Exit immediately if any command returns a non-zero exit status. -u: Treat unset variables as an error and exit immediately. -o pipefail: Ensures that if any command in a pipeline fails, the entire pipeline returns that failure code.

Prepare for Live Technical Interviews

At DoxaTech Hub, students receive mock interview drills, resume reviews, and direct coaching to ensure they pass rigorous engineering screens.

Join DoxaTech Today