Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
ping6 &

After I type this in the terminal, the command is ran in the background. However, it stills generate the output to the foreground, and print the result to the terminal.

How to make it display the output in the background?

share|improve this question
up vote 2 down vote accepted

You need to redirect to the null device:

ping >/dev/null
share|improve this answer
You're too fast. :) – Octavian Damiean Feb 26 '11 at 22:07

I know only two ways to solve this.

Either use the -q option on ping like this ping -q which makes it only display the summary lines at startup and on exit or you redirect the output to /dev/null like this
ping > /dev/null.

share|improve this answer

You might want try screen.

Just run screen in a terminal. You'll be greated by a little splash-screen with some information about screen and a copyright notice. Once you hit enter, a new shell is started "inside" screen.

Run your ping command in there, without the & behind it.

Now you can detach from the screen by hitting Ctrl+A+D. You'll be back to the shell you ran screen from. The program(s) running "inside" the screen will continue to run in the background.

To reattach to the screen, run screen -r, and you'll see the output produced by your ping command again.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.