Skip to content

nohup

nohup runs background processes uninterruptedly even the remote SSH session goes offline.

nohup mycmd &

You can also lower the priority for the background process

nohup nice mycmd &

Output

The output will be in nohup.out by default. If you want to customize the output location, just redirect it:

nohup mycmd &> log.txt &

To monitor what is inside nohup.out

tail -f nohup.out

End the running process

When you're done, you can kill the process by the process ID (PID).

ps -aux | grep mycmd
kill PID

Comments