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. /dev/null 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

  • Null in SQL is a special keyword that indicates that a database field does not contain a value.
  • Null (or Nul) is also a zero value ASCII character, commonly used to terminate line endings in files
  • Null String is a string variable in computer programming with zero length.
  • The NULL pointer is used in computer programming for a value which has not been initialized yet or which is just empty.

Share this page:

Suggested articles

0 Comment(s)

Add comment