Ubuntu – How to hide terminal output when executing a command

command line

When I launch certain programs from the command line like eclipse and document viewer in 11.10 it spews a load of information that seems inconsequential.

Also when they are run in the background they sometimes continue to produce output to the terminal which I am currently working on, which is irritating.

I would like them just launch and keep the background stuff in the background. My reasoning is that if you launch these programs through the GUI (eg double clicking on an icon) these messages are never shown to me, so I don't need them in the command line.

Best Answer

If you can avoid writing stuff in the console, it depends on how output from the program is created. If it is streamed to standard output, then it is just enough to do

$ eclipse >/dev/null

and no output should be made.

To suppress error messages as well:

$ eclipse >/dev/null 2>&1

Or in bash, simply:

$ eclipse &>/dev/null

But if they do it somehow differently then it might be a problem to stop it from writing in the console.

if possible use the solution given by MuffinStateWide