Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
ping6 ipv6.google.com &

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

3 Answers 3

up vote 2 down vote accepted

You need to redirect to the null device:

ping google.com >/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 google.com which makes it only display the summary lines at startup and on exit or you redirect the output to /dev/null like this
ping google.com > /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.