How to Install and use screen on Ubuntu 16.04

Screen is a full-screen window manager that multiplexes a physical terminal between several processes used in Unix and Linux like distro. Typically interactive shells. At least that’s what GNU says.

Let me explain a small scenario where we actually use it. Sometimes when you have a bad connection and your trying to install something in a VPS using ssh, you loose the connection in the middle of everything and there is no way of seeing the progress.

Perfect solution for this is screen. It will show you the same session that was having the installation progress.

Will be installing screen for Ubuntu 16.04

apt-get install screen

after the installation you can start screen by typing


now lets say that you have a bad connection and got disconnected and you to need to resume the session. you can immidiatly reattach to the same session using

screen -r

Just in case you have more than one screen running you can use following command to check how many screen sessions are available

screen -ls

One more thing to keep in mind is that nothing will be logged when using screen command. Just in case you want to log it, you can use the following command

screen -L

If you want to exit from screen, you can just type exit.

Leave a Reply

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