The redirects are processed from left to right. If you do
2>&1 1> /dev/null
The first redirect makes
stderr point to the stream that
stdout points to at that time (which is your tty essentially). It doesn't make
stderr an alias of
stdout is redirected to the bit bucket. The
stdout redirect doesn't affect the previous
stderr still refers to your tty.
ls file_that_doesnt_exist 2>&1 1> /dev/null
will print only the error message on your terminal.
bash redirection documentation page mentions this explicitly:
Note that the order of redirections is significant. For example, the command
ls > dirlist 2>&1
directs both standard output and standard error to the file dirlist, while the command
ls 2>&1 > dirlist
directs only the standard output to file dirlist, because the standard error was duplicated from the standard output before the standard output was redirected to dirlist.