将sh test.sh 命令在后台执行,并且保证当前终端断开连接的情况下命令仍然执行,正确的做法是:
sh test.sh &
nohup sh test.sh
nohup sh test.sh &
screen打开后台终端,执行sh test.sh