如何后台运行ttyd bash命令
可以使用nohup命令将ttyd命令放入后台运行,例如:
nohup ttyd bash &
这将在后台运行ttyd bash命令,并将输出重定向到nohup.out文件中。您可以使用以下命令检查ttyd进程是否正在运行:
ps aux | grep ttyd
如果您需要在系统启动时自动运行ttyd命令,可以将其添加到/etc/rc.local文件中。例如:
nohup ttyd bash &
请注意,如果您使用的是systemd,最好将ttyd作为systemd服务运行。
原文地址: https://www.cveoy.top/t/topic/fIrb 著作权归作者所有。请勿转载和采集!