Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start a long-running program over SSH [closed]

I have a Virtual Machine that is running Ubuntu, and I can SSH into the Virtual Machine just fine. I can even start my python program over SSH using the following:

python foldername/app.py

I am on a Windows machine, using Git Bash to SSH. If I start my python program this, way I have to leave the Git Bash window open. How can I start the python program without having to leave the Git Bash open on my Windows machine? Any help is much appreciated!

like image 284
antfuentes87 Avatar asked Feb 10 '26 17:02

antfuentes87


1 Answers

you can use nohup:

nohup python foldername/app.py &

now you can close your connection and the program will keep running. You can find more information here and here.

like image 194
Chris Maes Avatar answered Feb 12 '26 07:02

Chris Maes