谈天说地

gnu screen快捷键速查表

今天小研究了下gnu screen,发现强大的不得了,之前小看它了。再次体会了linux设计的精髓:工具功能单而精。

如果你对这个小软件知之甚少,可以参考:http://zh.wikipedia.org/wiki/GNU_Screen
如果你想深入研究,可以参考:http://www.gnu.org/software/screen/
如果你只想会用,随便上网搜搜“linux screen 用法”,就可以了。

在此,分享一下screen速查表格。(来自http://www.pixelbeat.org/lkdb/screen.html)

Key Action Notes
Ctrl+a c new window
Ctrl+a n next window I bind F12 to this
Ctrl+a p previous window I bind F11 to this
Ctrl+a “ select window from list I have window list in the status line
Ctrl+a Ctrl+a previous window viewed
Ctrl+a S split terminal horizontally into regions Ctrl+a c to create new window there
Ctrl+a | split terminal vertically into regions Requires debian/ubuntu patched screen 4.0
Ctrl+a :resize resize region
Ctrl+a :fit fit screen size to new terminal size Ctrl+a F is the same. Do after resizing xterm
Ctrl+a :remove remove region Ctrl+a X is the same
Ctrl+a tab Move to next region
Ctrl+a d detach screen from terminal Start screen with -r option to reattach
Ctrl+a A set window title
Ctrl+a x lock session Enter user password to unlock
Ctrl+a [ enter scrollback/copy mode Enter to start and end copy region. Ctrl+a ] to leave this mode
Ctrl+a ] paste buffer Supports pasting between windows
Ctrl+a > write paste buffer to file useful for copying between screens
Ctrl+a < read paste buffer from file useful for pasting between screens
Ctrl+a ? show key bindings/command names Note unbound commands only in man page
Ctrl+a : goto screen command prompt up shows last command entered

PS:推荐一篇screen好文:http://linux.chinaunix.net/bbs/archiver/tid-1049630.html

PS:推荐我自己的.screenrc配置

escape ^Oo
caption always "%{Yk}%-w%50&gt;%{rb}%n %t%{-}%+w%81&lt;%{- Yk}%{Bk}|%=%{bk} %Y-%m-%d %C "

PS:推荐另外一个.screenrc配置(如下信息都在一行内)

caption always “%?%F%{-b 4w}%:%{-b bb}%? %H | %l | %m-%d %c |%?%F%{-b 4w}%?%L=%-Lw%45>%{-b w4}%n%f*
%t%{-}%+Lw%-0<" [/shell] PS:继续推荐一个.screenrc配置 [shell] escape ^Oo term linux caption always "%{+b yk}%H %{wk}|%c %{bk}%d.%m.%Y %{wk}| %{rk}%72=Load: %l%{wk}" hardstatus alwayslastline "%?%{yk}%-Lw%?%{wb}%n*%f %t%?(%u)%?%?%{yk}%+Lw%?" [/shell] over~

发表您的评论

请您放心,您的信息会被严格保密。必填项已标识 *