HowtoForge

What does null mean in Linux and Computing

In this article, I will give you a short explanation of what the value null or the null device means in the computing world. The value null basically means that a variable has no value. Null is used in most computer programming languages and there is also a so-called null device (/dev/null) in Linux.

The /dev/null device in Linux and Unix like systems

/dev/null or the null device is a special virtual computer file that discards any data that you write to it.

The /dev/null device is e.g. used when you want to discard the output of a program that would have written its output to stdout otherwise, e.g. when used inside a cronjob.

Example Cronjob:

* * * * * /usr/local/bin/mycronscript.sh > /dev/null

The null value in Computer programming

What does null mean in Linux and Computing