All interview questions

Linux interview questions

4 questions interviewers actually ask, each with a model answer you can study and an AI drill that grades how you would say it out loud.

0%

0/4

Mastered

Questions and answers

0/4 mastered

Model answer

Use df -h to see which filesystem is full, then du -sh on directories, often du -sh /var/* sorted by size, to drill into the offender. Common culprits are logs and old artifacts. Watch for deleted-but-open files, which lsof can reveal, since the space is not freed until the holding process closes them.

Model answer

SIGTERM (15) asks a process to shut down gracefully, letting it clean up, and can be caught or ignored. SIGKILL (9) forcibly terminates immediately and cannot be caught or ignored. Always try SIGTERM first so the process can flush state, and reserve SIGKILL for processes that refuse to exit.

Model answer

The three digits are owner, group, and other, each summing read 4, write 2, and execute 1. So 755 means the owner has read, write, execute, and group and other have read and execute. 644 is read-write for owner and read for everyone else, the common mode for regular files.

Model answer

Start with uptime and top or htop to see load average and what is consuming CPU and memory. Use vmstat and iostat to separate CPU, memory, and disk pressure, and check for I/O wait. Inspect the heaviest processes, look at recent changes and logs in journalctl, and correlate with any deploy or traffic spike.

Shaky on any of these?

The Linux Fundamentals track on the roadmap teaches every concept behind them, from the ground up.