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. How do you find or stop processes by name using pgrep and pkill?

    pgrep prints the PIDs of processes whose names match a pattern, and pkill sends them a signal (SIGTERM by default). Use -f to match the full command line and -u to limit to a user. Always run pgrep first to see what would be hit.

    BeginnerQuick answer1 min read