使用上面介绍的很多了
下面给一份使用的配置
在根目录下新建一个文件 .screenrc
#=============================================================
# ~/.screenrc
#
# skip the startup message
startup_message off
#
# Automatically detach on hangup.
autodetach on
#
# If a screen dies, don't freeze the whole screen waiting for it.
nonblock on
#
# UTF-8 is necessary.
#defutf8 on
#
# Change default scrollback value for new windows: scrollback 10000
defscrollback 10000
#
# start with visual bell as default
vbell off
vbell_msg "Bell on %t (%n)"
#
# 在最下一行显示窗口列表和时钟
hardstatus on
hardstatus alwayslastline
#hardstatus string "%{.bW}%-w%{.rY}%n %t%{-}%+w %=%{..G} %H(%l) %{..Y} %Y/%m/%d %c:%s "
hardstatus string "%{.bw}%-w%{.ry}%n %t%{-}%+w %=%{..g} %H(%l) %{..y} %Y/%m/%d %c "
#hardstatus string "%{.bW}%-w%{.rY}%n %t%{-}%+w %=%{..G} "
#hardstatus string "%{.bW}%-w%{= rY}%50>%n %t%{-}%+w%<"
# 关闭错误提示
vbell off
#
# default windows 新起的时候预定义2个窗口
screen -t shell 0
screen -t vim 1
##
## 按 Ctrl-Z w 或 Ctrl-Z Ctrl-W 显示窗口列表
bind w windowlist -b
#bind ^w windowlist -b
##
## 定义screen的功能键为Ctrl-Z。向终端输入Ctrl-Z时应按 Ctrl-Z z。
#escape ^Zz
bindkey -k k5 screen #F5新建
bindkey -k k6 title #F6改名称
bindkey -k k9 detach #F9
bindkey -k F1 prev #F11 F12前后切换
bindkey -k F2 next #
#=========================================================
screen -ls 列出当前有那些会话
screen -r sessionid 连接会话