A userfriendly screen.rc .

Gnu Screen is a terminal multiplexer. With it you can mange multiple virtual terminals in one terminal session and discard them to background (all running scripts on virtual terminals continue running) to reactivate it later. So it’s possible to open various shells in one single SSH session. But I don’t want to go to much into detail, if you are interested more information about it visit their website or use any search engine out there!

To install it on any Debian/Ubuntu derivative:

aptitude install screen

Here are the most useful commands:

Ctrl+a c
create a new virtual terminal
Ctrl+a SPACE
change to next terminal
Ctrl+a BACKSPACE
change to previous terminal
Ctrl+a [NUM]
change to screen number NUM
Ctrl+a Ctrl+a
change to last used terminal
Ctrl+a w
display titel of all terminals
Ctrl+a d
detach screen, all terms continue running in background until you re-attach them
Ctrl+a k
kill one single terminal
Ctrl+a \\
quit screen
Ctrl+a A
change the title of the actual terminal
Ctrl+a [
enable copy mode, you can browse through the terminal with the cursor
Ctrl+a ?
overview about all keys
Ctrl+a a
send Ctrl+a to the terminal, otherwise screen will capture the Ctrl+a

To get an overview of all deattached sessions just run

screen -ls

A detached session can be re-attached on your bash prompt with

screen -r [OPT-IDENTIFIER]

My Screen.rc

The original look and feel of screen is very ugly. It’s hard to keep track of all the virtual terminals and it’s nasty that you’re not able to scroll within the screen.

Just save the following file to $HOME/.screenrc and your screen-session will look like figure 1. This configuration allows you among others to scroll within the screen and enables some more key-bindings:

F2
create a new screen
F3
change to previous terminal
F4
change to next terminal
F5
enable copy-mode
F6
change titel of the terminal
F7
deattach the screen
F8
quit

Download it directly from your terminal:

wget -O $HOME/.screenrc http://binfalse.de/wp-content/uploads/pipapo/conf/screen.rc
Download: RC: .screenrc (Please take a look at the man-page. Browse bugs and feature requests.)

Martin Scharm

stuff. just for the records.

Do you like this page?
You can actively support me!

Leave a comment

There are multiple options to leave a comment: