步骤:
1.启动一个process, 如top,按CTRL-Z 将target process 放入background task
2. resume the process in background: bg
3. disown top
4. open an session
5. reptyr pidoftarget
参考:
https://blog.nelhage.com/2011/01/reptyr-attach-a-running-process-to-a-new-terminal/
使用reptyr重新连接进程到新终端

本文介绍了一种方法,通过使用reptyr工具将正在运行的进程重新连接到新的终端会话中。具体步骤包括:将目标进程置于后台、在后台恢复进程、取消对进程的所有权、打开新会话并重新获取目标进程PID。此方法适用于需要将进程从一个终端窗口转移到另一个场景。
566

被折叠的 条评论
为什么被折叠?



