Command Line Proficiency and Troubleshooting Questions
Comfortable using shell commands for system troubleshooting and administration. Key tools: ps (process information), top and htop (real-time monitoring), grep, sed, awk (text processing), curl (HTTP requests), netstat and ss (network statistics), du and df (disk usage), kill and killall (process termination), tar and gzip (compression). Know how to redirect I/O, pipe commands together, and create simple scripts. Understand how to use man pages.
MediumTechnical
37 practiced
On a busy host, htop shows many threads under one process and you suspect a thread is stuck in kernel mode causing latency. Describe how you would use CLI tools (htop/top, ps, /proc, and others) to identify the thread consuming CPU, inspect its TID, and gather information to file with developers. Include the commands and fields you'd collect.
HardTechnical
60 practiced
Explain the semantics and practical differences between SIGTERM, SIGINT, SIGQUIT, SIGHUP and SIGKILL for typical POSIX services. Then show how to trap SIGTERM and perform graceful shutdown in a bash script started by init system, including the trap line and cleanup function stub.
MediumTechnical
35 practiced
The systemd journal shows frequent service restarts. From CLI, how would you collect recent journal entries for a specific service, correlate restarts with timestamps, extract the Restart= or exit code information, and save the artifact for a postmortem? Provide the commands (journalctl or alternatives) and explain how you'd filter by boot id and time-range.
EasyTechnical
67 practiced
You're the on-call SRE and a service process is unresponsive. Using only local CLI tools and man pages, describe how you'd discover available Unix signals, learn their meanings, and decide whether to send SIGTERM or SIGKILL. Include the specific commands you would run to list signals and to read man-page sections for signals and kill semantics, and explain your decision criteria for which signal to use in production.
MediumTechnical
36 practiced
Create a small, well-documented shell function to retry a given command up to N times with exponential backoff and jitter. The function should accept the command as arguments, the max retries, and a base delay. Provide the function in bash and explain how it handles exit codes and signal propagation.
Unlock Full Question Bank
Get access to hundreds of Command Line Proficiency and Troubleshooting interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.