the magic of screen command

screen is excellent screen managment utility which will make the command line fans much more easier !

installation

installing is simple as running yum command :
yum install screen -y

using screens windows

Create ~./.screenrc file containing the below :

caption always "%{+b rk}%H%{gk} |%c %{yk}%d.%m.%Y | %72=Load: %l %{wk}"
hardstatus alwayslastline "%?%{yk}%-Lw%?%{wb}%n*%f %t%?(%u)%?%?%{yk}%+Lw%?"

for more information refer to :

https://www.debian-administration.org/article/560/An_introduction_to_the_visual_features_of_GNU_Screen

working with multiple windows :
screen
ctrl+A -> c : create new screen command window
switch to relevant screen:

ctrl+A -> <number>
or
ctrl+A -> ” ( and than select relevant window)

it will be looked like below :

screen2

using splitted screens

working with splitted screens :

screen
ctrl+A -> shift+S : create new screen session
ctrl+A -> tab :switch to next screen
ctrl+A -> c : create new screen
ctrl+A -> shift+| : create new horizontal screen
ctrl+A -> tab :switch to next screen
ctrl+A -> c : create new screen command window

ctrl+A -> shift+X : kill current screen
ctrl+A -> n : go to next screen

screen1

sharing screening

in order to share screen or to connect screen session from home use the below :

screen -S myshare
screen -ls
There are screens on:
24703.myshare (Attached)
4055.pts-9.centos7 (Attached)

open new putty window and run :
screen -x myshare #you can also use the number

for more information :
http://aperiodic.net/screen/quick_reference

http://www.kilobitspersecond.com/2014/02/10/understanding-gnu-screens-hardstatus-strings/

http://www.linuxjournal.com/article/10950 (refer to backtick numbering)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s