Screen is a window manager for unix shells. It’s useful when logged in to a remote server because it allows you to have more than one shell running through the same terminal window. So you don’t have to log in multiple times through SSH to, for example, run a long running command in one shell and continue working in another.
This is just a quick note to help remember the most common commands. For more information see man screen.
Getting in and out
- Start screen
- Detach from a screen session (session remains open)
- Re-attach to an open screen session
$ screen -D -R
- Quit screen completely (session closed)
- Create a new window with a shell and switch to it
- List currently open windows for selection
- Close current window
Using regions allows you to display more than one shell on your terminal.
- Split the current region into 2 new ones (note: the new region will be blank, you need to switch to it then select a window to display in it)
- Switch focus to the next region
- Remove the current region
That should be enough to get started