Linux Linux Commands

Tutorial To Install And Use Linux Screen

Tutorial To Install And Use Linux Screen
Written by itsubuntu

Last Updated on

Tutorial To Install And Use Linux Screen

GNU Screen is a full-screen window manager that multiplexes a physical terminal between several processes which means that you open any number of windows (virtual terminals) inside a session.

Even if your session is disconnected, processes running inside the windows will continue to run. GNU Screen allows resuming the sessions.

Tutorial To Install And Use Linux Screen

You might have GNU Screen installed in your Linux as it comes by default in most of the Linux based operating system. You can check it with the following command:

screen --version

Install Linux Screen On Ubuntu And Debian Based Operating Systems

Run the following command to install GNU Screen on Ubuntu and Debian based distros.

sudo apt install screen

Install Linux Screen On CentOS/RHEL And Fedora

Run the following command to install GNU Screen on CentOS/RHEL and Fedora.

sudo yum install screen

How To Start Linux Screen

Run the following command in your terminal to start screen.

screen

Now, You will have a screen session. You can easily create a new window, and start a shell session in that window.

Type Ctrl-A ? to list out all commands or parameters on screen. Run the following command to create a named session.

screen -S your_session_name

Create a new window with a shell with Ctrl+a c a keyword combination. List out the windows with Ctrl+a " keyword combination.

You can detach from the screen session at any time by typing:

Ctrl+a d

You can reattach with the following command:

screen -r

You can switch between screen using command “Ctrl-A” and “n“ to a move to the next screen. And to get back to the previous screen, just press “Ctrl-A” and “p“.

Run the following command to log your activities in session.

screen -L

To create a new screen window, just press “Ctrl-A” and “c“.

For the the manual, please visit the official documentation link.

About the author

itsubuntu

Leave a Comment