How to really hide terminal output?
What you are seeing are the errors, being printed to stderr (standard error). By default stderr is printed to the terminal used to start the program. We can change this easily though, to point to /dev/null
, which is basically a black hole. It's a device that doesn't do anything, so when you write to it, nothing actually happens. The following command will redirect ALL output (stderr and stdout) to /dev/null
and then give you back your terminal.
firefox &> /dev/null &
The &>
is the redirector, /dev/null
is where we are redirecting to, and the last &
means to "background" the process, so we can have our terminal back.
On a side note, if you ever want to bring a backgrounded program back to the terminal, you can use the fg
(short for foreground) command to bring it back. And if you type the combination of keys Ctrl+Z you will be able to "suspend" the process, then you can type bg
to send it back to background.