2 is STDERR.

$ echo_to_stderr 2>/dev/null # echos nothing

Definitions:

echo_to_stderr is a command that writes "stderr" to STDERR

echo_to_stderr () {
    echo stderr >&2
}

$ echo_to_stderr
stderr