1

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

6
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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