Debian:SSH连接并运行一个在SSH连接关闭时不会死的进程

时间:2022-10-28 07:34:42

Running a Debian server and would like to install Ruby but it's taking almost an hour on "compiling", and I can never keep my SSH connection up for so long.

运行Debian服务器并希望安装Ruby,但是“编译”花了将近一个小时,而且我永远不能保持SSH连接这么长时间。

I was hoping to SSH into the server, running the installation command and leave it running on the server once I close my SSH connection, and be able to check back on it later.

我希望SSH连接到服务器,运行安装命令,并在我关闭SSH连接后让它在服务器上运行,并能够稍后再检查它。

Is there a way to do that?

有没有办法做到这一点?

Please and thank you in advance!

请提前谢谢!

1 个解决方案

#1


1  

Repeating myself, but I am writing an answer so it can be marked as accepted/solved :)

重复自己,但我正在写一个答案,所以它可以标记为已接受/已解决:)

Learn about screen and/or tmux! You won't regret it. tmux is newer and better. *.com/questions/70661/what-is-gnu-screen

了解屏幕和/或tmux!你不会后悔的。 tmux更新更好。 *.com/questions/70661/what-is-gnu-screen

screen/tmux let's you keep a remote terminal session running that you can connect/reconnect to - I always start long running tasks in a screen in case my connection drops (or in case I wanna leave the office and go home ;) ).

screen / tmux让你保持一个可以连接/重新连接的远程终端会话 - 我总是在屏幕上启动长时间运行的任务,以防我的连接断开(或者我想离开办公室回家;))。

#1


1  

Repeating myself, but I am writing an answer so it can be marked as accepted/solved :)

重复自己,但我正在写一个答案,所以它可以标记为已接受/已解决:)

Learn about screen and/or tmux! You won't regret it. tmux is newer and better. *.com/questions/70661/what-is-gnu-screen

了解屏幕和/或tmux!你不会后悔的。 tmux更新更好。 *.com/questions/70661/what-is-gnu-screen

screen/tmux let's you keep a remote terminal session running that you can connect/reconnect to - I always start long running tasks in a screen in case my connection drops (or in case I wanna leave the office and go home ;) ).

screen / tmux让你保持一个可以连接/重新连接的远程终端会话 - 我总是在屏幕上启动长时间运行的任务,以防我的连接断开(或者我想离开办公室回家;))。