SSH session running

Screen is like a window manager for your console. It will allow you to keep multiple terminal sessions running and easily switch between them - much like the Mac OS and Windows 10 desktop screens. It also protects you from disconnection, because the screen session doesn’t end when you get disconnected - this is very handy if your connect gets borken pipes or unreliable connections.

To make sure screen is installed on the server you are connecting to use the following command:

sudo apt-get install screen

Or with CentOS 5+ 

sudo yum install screen

Now that screen has been installed you can create a new screen session by using the simple command below.


To disconnect but leave the session running in the background:

Press Ctrl+A and then Ctrl+D. You will see the message [detached]

To reconnect to an already running session:

screen -r

To reconnect to an existing session, or create a new one if none exists

screen -D -r

To create a new window inside of a running screen session

Hit Ctrl+A and then C in immediate succession. You will see a new prompt.

To switch from one screen window to another

Hit Ctrl+A and then Ctrl+A in immediate succession.

To list open screen windows

screen -ls

There’s lots of other commands you can use but the above will do most of the common elements of using screen.

  • ssh session
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

IP class

For dedicated server owners.Each IP you order is class 4 Failover and are switchable between your...

Geolocated IP addresse

You have created sites with an international focus and are keen to work on SEO for your target...

The keyword cannibalization

Keyword cannibalization means that you have various blog posts or articles on your site that can...

Editing files using VI

VI is a Linux text editor that can edit most of the files under a Linux architecture (text files,...

Dedicated Server Info manual

This manual is to be used to make all administrators more sensitive regarding few topics related...