In my machine I have installed Ubuntu 12.04 and I have installed putty. I want to start putty from command line. When I run the program from command line and after closing the terminal, putty also gets terminated. How to avoid that ?
2 Answers
Try to add an "&" behind your command. So putty& will be your command, this will tell the terminal to run it in background. Next you have to type "disown" to detach the process from the terminal.
so:
user@yourhost:putty&
user@yourhost:disown
Prepend the command with nohoup
:
nohup putty &
exit
-
I thing appending
&
is quite enough.nohup
detaches the process from the user so it still runs when the user logs out. right?– amyassinSep 29, 2012 at 10:02 -
1No
nohup
prevents its child process from receiving incoming HUP signals. This will letputty
keep running after the "command line" the OP mentioned, is closed.– ThorSep 29, 2012 at 10:09