Monday, December 5, 2016

Screen - Linux Utility

Screen is an linux utility to do tasks on many terminal, with just one SSH connection to a server.  We can consider it somewhat like the tabs on our browser.

To start Screen

$ screen -S Bala
The word Bala will be attached to this version of screens.  This means to say that I can open another screen which has its one set of tables with another name of Test with the command "screen -S Test"

#
Command
Definition
1
CTRL+A & press c
To create a new Tab inside the screen
2
CTRL+A & press n
To switch between the tabs.
3
CTRL+A & press d
To detach from this screen instance to be reconnected later.
4
Screen -ls
This can be used to list all screen process like Bala or Test.
5
Screen -r
This can be used to reattach to the detached screen.
6
CTRL+A & Shift s
To Split the screen horizontally
7
CTRL+A & Tab
To move to the split screen.
8
CTRL+A & press c
To get the prompt here
9
CTRL+A & Shift x
To remove the split screen.
10        CTRL+A [                              To scroll in the screen and press ESC to get out of copy mode.

http://unix.stackexchange.com/questions/26248/tabs-when-using-screen

Put this in .screenrc

# skip the startup message
startup_message off

# go to home dir
chdir

# Automatically detach on hangup. 
autodetach on

# Change default scrollback value for new windows
defscrollback 10000

# start with visual bell as default
vbell on
vbell_msg "bell on %t (%n)"

# look and feel
caption always "%{= bb}%{+b w}%n %t %h %=%l %H %c"
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"

activity "Activity in %t(%n)"

shelltitle "shell"
shell -$SHELL

No comments:

Post a Comment