Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I run

nohup bash -c "while [ true ]; do echo test; done"

from PuTTy SSH client, but after this process is not running in background instead nohup keeps to be foreground process in shell.

SW version: nohup (GNU coreutils) 8.5

share|improve this question
up vote 4 down vote accepted
nohup bash -c "while [ true ]; do echo test; done" &

Nohup provides you immunity to hangup signals. But it does not automatically set the process to background.

It's the & at the end of the command that causes it to run in the background.

share|improve this answer
Thanks for the precision @Randy Orrison – M'vy Apr 12 '11 at 8:01

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.