Reputation: 21
I recently just set up a program on a Linux Server over Putty. I want this program to be running at all times and was wondering how I could do this without having to keep my own computer on at all times (because if I close Putty, the program is also killed). Would I need console access to the server? Sorry, kind of new to this :(
Upvotes: 0
Views: 836
Reputation: 14360
It seems your scenario is you´re running a program on a Linux box program througth putty from a Windows machine. And yuo want keep the program running even after closing the conection. Well for accomplish that you have tio ensure the program don´t close with your session, in other words it has to be independant. So, you need create a service (see: Making a script into a linux service) or run the script at linux startup.
You can then use putty just for configuring how the program starts. And not for start the program.
Upvotes: 0
Reputation: 2715
You need to run the application in the background using nohup. So if your application is called myappp and is located in the current directory execute
nohup ./myapp &
Upvotes: 1
Reputation: 7238
Use GNU Screen
CTRL-A
(release keys) D
to detachYou can reattach with screen -ddR
and list screen sessions with screen -ls
. Read a tutorial like http://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/ for more details
Upvotes: 0