Screen is a full-screen software application that can be used to multiplex a physical console between multiple processes (typically interactive shells). It allows the user to open multiple terminal instances within a single terminal window manager.

When dealing with multiple programs from a command line interface or separating programs from the terminal shell, the screen application comes in handy. You can also share your sessions with other users and detach/attach terminal sessions.

Use below package and command to install Screen command in Linux.

[[email protected] ~]# apt-get install screen (On Debian based Systems)
[[email protected] ~]# yum install screen (On RedHat based Systems)

Actually, Screen is a very useful command in Linux that is hidden among hundreds of others. Let us begin by looking at the function of Screen.

Start screen for the first time

Simply enter screen at the command prompt. The screen will then display the same interface as the command prompt.

[[email protected] ~]# screen

To start a new screen session

If you want to initiate new screen session,use screen -S and screenname for eg:

[[email protected] ~]# screen -S example.screen

To list all current screen session

If you want to list screen session,use “screen -ls” like below command. for eg:

[[email protected] ~]# screen -ls

You will get out like this:

There is a screen on:
28706.abc (Detached)

Detached the screen

You need to press CTRL+A+D for Detached the screen on which currently you have login.

Reattach to the screen

For reattach the screen you need to use screen -r and screen id,eg:-

[[email protected] ~]# screen -r 28706.abc  

That is a sample of daily screen usage. There are still many features available within the screen command. For more information, see the screen man page.

Thankyou…..