Interview Q&A / Linux & Shell

INTERVIEW Q&A · 63 QUESTIONS

Linux & Shell interview questions

Permissions, processes, pipes and the commands you are expected to know cold.

  1. What are nice and renice, and what do the values mean?

    nice starts a process with a chosen priority adjustment and renice changes it for a running process. Niceness ranges from -20 (highest priority) to 19 (lowest). Lowering priority with a higher number is polite to others; raising it needs root.

    IntermediateQuick answer1 min read
  2. What does load average mean in top and uptime?

    Load average is the average number of processes running or waiting for the CPU (and, on Linux, waiting on uninterruptible I/O) over the last 1, 5 and 15 minutes. Compare it with the number of CPU cores: on 4 cores, a load near 4 means fully busy.

    IntermediateQuick answer1 min read
  3. What is /proc in Linux, and is it a real folder on disk?

    /proc is a virtual file system created by the kernel in memory. Its files show live information about running processes and the system, such as /proc/cpuinfo and /proc/PID/status. Nothing in it is stored on disk.

    IntermediateQuick answer1 min read
  4. What is a zombie process, and how do you get rid of it?

    A zombie is a process that has finished but still has an entry in the process table because its parent has not read its exit status. It uses no CPU or memory beyond that entry. You fix it by making the parent call wait, restarting the parent, or killing the parent so init adopts and cleans it.

    IntermediateQuick answer1 min read