A sample of real Linux interview questions with full answers and explanations - practice for interviews or certification exams.
Matching file sizes alone doesn't guarantee the CONTENTS are identical, corruption can happen without changing a file's size. A cryptographic checksum like sha256sum produces a unique fingerprint of the actual content, so comparing those fingerprints is the fast, reliable way to confirm two large files are truly byte-for-byte the same.
LVM is a stack of layers, physical volume, then volume group, then logical volume, and each layer has to actually include the new disk's space before the one above it can use it. Trying to resize the filesystem first would fail outright, since the logical volume underneath it hasn't actually grown yet to give it anything to expand into.
Manually pushing a static hosts file to every server works for a handful of machines, but it falls apart as the fleet grows, every single change means re-pushing everywhere, and it's easy for things to quietly drift out of sync. A real internal DNS service is built exactly to solve this at scale, one place to update, and every server just looks it up.
ip addr is the modern replacement for the older, now-deprecated ifconfig, and it exposes a lot more of what the kernel actually tracks, like whether an interface is part of a bond, belongs to a VRF, or has no physical link detected at all (NO-CARRIER), details ifconfig was never updated to show.
These sound similar but solve different problems: REUSEADDR just lets a NEW process bind to a port that's still lingering in TIME_WAIT from an old one that used it, while REUSEPORT lets MULTIPLE processes bind that exact same port AT THE SAME TIME, with the kernel spreading incoming connections across all of them, which is how you'd run several worker processes load-balancing one port.
A Cmnd_Alias lets you define a named set of commands once (like 'service-restarts'), and then grant that whole set to a group in one line, so as teams and permissions grow, you're managing a handful of clean rules instead of either one giant unmaintainable list of individual users, or worse, giving everyone blanket full access just to avoid the hassle.
When a file gets deleted while a process still has it open, Linux doesn't actually free the disk space, it just removes the name from the directory listing. lsof +L1 specifically shows you files like that, ones a process is still holding open even though their link count has dropped to zero, which is exactly how you'd notice disk space that 'should' be free but isn't.
arping works entirely below the IP layer, it sends a raw ARP request and waits for a MAC address to reply, so it doesn't rely on ICMP (what ping uses) at all. That makes it a reliable way to confirm a device is present on the local network segment even when a firewall is specifically blocking ping.
Running ulimit interactively only changes the limit for THAT shell session and whatever it spawns afterward, it's completely forgotten the moment you log out or reboot. To make a higher file-descriptor limit stick permanently for a user or service, it needs to be configured in limits.conf (or the equivalent systemd setting for a service), not set ad hoc in a terminal.
systemctl isolate (or the older init/telinit) only changes what's running RIGHT NOW, it reverts back on the next reboot. set-default is the one that actually updates the persistent symlink deciding what boots every single time going forward, which is what 'by default going forward' actually needs.
Real scenario-based DevOps questions, hands-on practice, and clear explanations for every answer.