杀死ssh会话会杀死正在运行的进程 [英] Killing ssh session kills running process
本文介绍了杀死ssh会话会杀死正在运行的进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用ssh连接到我的ubuntu服务器.我使用命令启动编码程序.但是,似乎我的ssh会话关闭时(因为我是在睡觉的笔记本电脑上启动它的).有什么方法可以避免这种情况(当然,防止笔记本电脑进入睡眠状态不是永久性的解决方案).
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).
推荐答案
屏幕最适合您.
screen -S some_name
而不是运行它.使用ctrl + a d
than run it. Detach it with: ctrl+a d
下次,附上:
screen -rd some_name
您可以有更多运行屏幕.要显示它们的列表:
You can have more runnning screens. To show the list of them:
screen -ls
这篇关于杀死ssh会话会杀死正在运行的进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文