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 /dev/null and /dev/zero, and what are they used for?

    /dev/null is a black hole: anything written to it vanishes and reading from it returns nothing. /dev/zero produces an endless stream of zero bytes. They are used to discard output and to create blank files of a given size.

    BeginnerQuick answer1 min read