Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals) inside that session.

How Screen Works

Processes running on Screen will continue to run when their window is not visible even if you get disconnected.


How to install Screen with apt in ubuntu.

$ apt install screen


Below are some most common commands for managing Linux Screen Windows:

  • Ctrl+a c Create a new window (with shell).

  • Ctrl+a " List all windows.

  • Ctrl+a 0 Switch to window 0 (by number).

  • Ctrl+a A Rename the current window.

  • Ctrl+a S Split the current region horizontally into two regions.

  • Ctrl+a | Split the current region vertically into two regions.

  • Ctrl+a tab Switch the input focus to the next region.

  • Ctrl+a Ctrl+a Toggle between the current and previous windows

  • Ctrl+a Q Close all regions but the current one.

  • Ctrl+a X Close the current region.

Start new Session

$ screen

Start new Session with name

$ screen -S session1

Detach Session

Ctrl+a d

Attach Session

$ screen -r session1

List Screen

$ screen -ls