在远程命令行下某些长时间的操作,一旦网络出现故障,后果可能会很严重,在这种情况下可以使用screen命令来解决。screen可以创建一个session,在不小心断开以后还可以继续恢复session保存的状态
安装
#RH or CentOS
yum install screen
#Debian
apt-get install screen
创建session
screen -S newsession
恢复一个session
screen -r newsession
查看所有的session
screen -ls
退出session
exit
演示屏幕
观众可以登录到远程服务器使用
screen -x newsession
和操作者同步屏幕内容
暂离
按住Ctrl,再按a,d