Warning: usort() expects parameter 2 to be a valid callback, function 'tag_sort' not found or invalid function name in /www/wwwroot/www.blogyc.cn/wp-content/themes/zbfox/core/functions/zbfox-hook.php on line 1668
![tmux多路后台会话功能 即使SSH断开程序也可以在内置会话中执行 实现后台稳定运行-洋葱Blog tmux多路后台会话功能 即使SSH断开程序也可以在内置会话中执行 实现后台稳定运行-洋葱Blog](https://https://jp.blogyc.cn/uploads/2023/04/2025cb5227234607.png)
有长时间任务或者后台程序运行需求大家可以使用tmux,比如编译程序,推流直播,SSH连接不稳定等等场景需求。你可以把这些程序存放到一个独立会话中,让他自己运作,完全不影响SSH主会话。
即使SSH断了,你在tmux中的程序也不会断连。
安装
apt update -y && apt install -y tmux
创建一个会话进入(可多开N个后台会话)
tmux new -s my1
![tmux多路后台会话功能 即使SSH断开程序也可以在内置会话中执行 实现后台稳定运行-洋葱Blog tmux多路后台会话功能 即使SSH断开程序也可以在内置会话中执行 实现后台稳定运行-洋葱Blog](https://https://jp.blogyc.cn/uploads/2023/04/47ae1d4d06234714.jpg)
退出会话不中断 Crl+b然后d
重新进入会话
tmux attach-session -t my1
查看所有tmux会话
tmux list-sessions
删除会话
tmux kill-session -t my1
crl+d
感谢您的来访,获取更多精彩文章请收藏本站。
![](https://www.blogyc.cn/wp-content/uploads/2023/04/bdccbad813201400.gif)
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容