字节流的博客

nohup - 使程序在远程主机后台运行

1. nohup

  • nohup:不挂断地运行命令(如:ssh服务器时执行任务,关闭ssh连接是服务不会停止)
  • Usage: nohup Command [ Arg … ] [ & ]
  • Example:
    • nohup python server.py &
    • nohup /root/test.php &
  • jobs:查看任务
  • fg %n:关闭任务
Thanks! 😊