Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Killing ssh session kills running process

I'm connecting to my ubuntu server using ssh. I start an encoding program using a command. However, it seems that when my ssh session closes (because I started it on a laptop which went to sleep). Is there a way to avoid this (of course preventing my laptop from sleeping is not a permanent solution).

like image 864
Etienne Noël Avatar asked Jun 27 '26 08:06

Etienne Noël


1 Answers

Run your command with nohup or use screen nohup is better when your program generate some loging output because it's forward to file and then you can check it, but with screen you can detach ssh session and when you log again you can restore your work-space. For encoding I'll use nohup. It is easier and you probably run it in background, so you really don't need detaching

like image 133
janisz Avatar answered Jun 28 '26 20:06

janisz