Command Line

Unix: Get Your Program Running in the Background

What if you have a program that you’d like to run in the background remotely after you’ve exited from your terminal/shell prompt?

Use the nohup command!

nohup some-command &

Maybe you have a python script called, you should run nohup python &. The “&” symbol is required so that the process will enter the background.

You can later terminate it by running ps aux to obtain the process id, and calling kill -9 1234, if the process id is 1234.

Leave a Reply

Your email address will not be published. Required fields are marked *