Run python script in the background

Create a new file, named

# Make your file executable by using chmod
chmod +x


 Add the following content into your file, where represents your python file.

nohup python  &


Execute your file



Check if your script is running:

ps ax | grep


Stop your script by using pkill

pkill -f -9