[root@test ~]# screen -list There is a screen on: 23536.pts-0.wdzee (10/04/2012 08:40:45 AM) (Detached) 1 Socket in /var/run/screen/S-root. [root@test ~]# screen -S 23536 -X quit
快捷键
1 2 3 4 5 6 7 8 9
# 进入screen会话后,可在会话中创建多个窗口(window),并对窗口进行管理,管理命令以ctrl + a开头 Ctrl a + c #screen在该会话内生成一个新的窗口并切换到该窗口 Ctrl a + n #切换到下一个窗口 Ctrl a + p #切换到前一个窗口 Ctrl a + k #关闭当前窗口 Ctrl + a 再按shift + s #上下分屏 Ctrl + a 再按tab键 #切换屏幕 Ctrl + a 再按c #新建一个终端 Ctrl + a 再按x (或直接按exit退出)#关闭一个终端
#set coding #defencoding GBK #encoding UTF-8 GBK #see the startup message startup_message off term linux ##use ` as the Global Key ### escape `` ###set a biger buffer defscrollback 409600 ##设置状态栏 hardstatus alwayslastline shelltitle "$|bash"
# a short version, can use C-a #hardstatus string '%{= kg}[ %{G}%c:%s %{g}][%= %{= kw}%?%-Lw%?%{Y}%n*%f%t %{K}%?%+Lw%?%= %{g}][%{kG} %D %Y/%m/%d %{g}]'
# ###shutdown the noise vbell off # ### w to show the window list bind w windowlist -b bind ^w windowlist -b ###initial apps to run screen -t compile 0 screen -t build 1 screen -t package 2 screen -t tmp 3 screen -t test 4 select 0 # #进行快捷键的绑定 bindkey -k k8 screen bindkey -k k9 title bindkey -k k; detach bindkey -k F1 prev bindkey -k F2 next bindkey -k k4 quit attrcolor u "-u B" autodetach on