Linux下,普通进程在关闭终端时会收到SIGHUP信号(挂起信号)而退出,nohup命令(no hang up)可以使命令忽略SIGHUP信号,在关闭终端后继续运行.使用格式:
# &表示让命令在后台运行,默认nohup只是SIGHUP命令nohup commandname &
nohup commandname > myout.file 2>&1 &