screen后台运行任意终端
1.系统安装screen
centos
yum install screen
debian
apt install screen
2.创建一个新的窗口
screen -S test
3.进入窗口后 执行文件
python test.py
4.退出当前窗口
ctrl+a+d (方法1:保留当前窗口)
screen -d (方法2:保留当前窗口)
exit (方法3:退出程序,并关闭窗口)
5.查看窗口
screen -ls
6.重新连接窗口
screen -r id或窗口名称
7.示例:
screen -r 344
screen -r test