Interview Q&A · questions with model answers
Linux Interview Questions
Part of the study plan for: DevOps Engineer · Site Reliability Engineer (SRE)
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
How do you troubleshoot DNS resolution and network connectivity on Linux?
Work up the layers: is the interface up with an address and route, can you reach the IP, does the name resolve (and with which resolver), is the port open, and does TLS/HTTP work? Separate DNS…
-
How do you find what's listening on a port and which process owns it?
ss -tlnp lists listening TCP sockets with the owning process (run with sudo to see all processes); sudo lsof -i :8080 shows which process has a given port open. Check the bind address too:…
-
How do you search logs effectively with journalctl and standard tools?
Use journalctl filters (unit, time, priority, boot) to narrow the journal, and grep, awk and sort | uniq -c on text logs to count and group errors. For anything across servers, use the central log…