Screen – A tool to multiplex remote terminal session

Are you tired of opening multiple connection to your remote  server or embedded target machine?.

SSH connectionThen GNU screen is an apt tool for your day to day Linux life. Using a single connection (telnet/ssh) you can manage multiple windows multiplexed within. It works like this.



Say you have a server named “code” in order to open multiple windows using a single connection you need to do the following.

ssh me@code 
(enter the password and you get a shell)
apt-get install screen
yum install screen
$ screen
#or to start a screen session with a name
$ screen -S your_session_name
Type "Control + a" and then "c" 

Lets create a couple of sessions by repeating the above steps.

moving forward over session, n means next
Type "Control + a" and then "n"
moving backward over session, p means previous
Type "Control + a" and then "p"

You can detach the screen and exit the connection

Type "Control + a" and "d"

Later you can reattach like this

screen -r 
or if you gave a session name
screen -r your_session_name

if you are moving away from the table the you can lock your screen like this.
You system password is used for locking it.

Type "Control + a" and then "k"

One thought on “Screen – A tool to multiplex remote terminal session

  • March 21, 2017 at 10:28 pm

    GNU screen has largely been supplanted by tmux, terminal multiplexer.


Leave a Reply

Your email address will not be published. Required fields are marked *