Sam Ducker Sam Ducker - 5 months ago 28
Linux Question

Running a Python script in the background

Hey I'm running a python script that uses selenium.

When I run python3.5 quickstart.py it works a treat. When I use nohup python3.5 quickstart.py it doesn't work and nohup.out doesn't have any content and of course the python3.5 quickstart.py ends when I close my shell.

Answer Source

You should add & after nohup command:

nohup python program.py &