On UNIX system, programs and commands send error messages to users by writing to standard error, which is by convention assigned in the process as file descriptor 2. This allows a clean separation between normal output and error output.

Though standard error is usually the terminal, the user can redirect standard error to /dev/null or some other device or file, in most shells using '2>'. i.e:

command 2> /dev/null
See also about standard input and standard output.