0

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 :(

user2620747
  • 21
  • 1
  • 3
  • Us [tmux screen](http://www.dayid.org/os/notes/tm.html) it's way cooler :D and you better ask such questions on http://unix.stackexchange.com/ – Sir l33tname Jun 26 '14 at 14:03

3 Answers3

1

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 &

nomis
  • 2,545
  • 1
  • 14
  • 15
0

Use GNU Screen

  • $ screen -R MY-SESSION-NAME
  • $ ./YOUR-PROGRAM
  • CTRL-A (release keys) D to detach

You 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

scottt
  • 7,008
  • 27
  • 37
0

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.

Community
  • 1
  • 1
Raydel Miranda
  • 13,825
  • 3
  • 38
  • 60