shell – What is /dev/null 2>&1?

> /dev/null redirects standard output (stdout) to /dev/null, which discards it.

2>&1 redirects standard error (2) to standard output (1), which then discards it as well since standard output has already been redirected.

Source: shell – What is /dev/null 2>&1? – Stack Overflow

shell – What is /dev/null 2>&1? was last modified: April 4th, 2021 by Jovan Stosic

Leave a Reply