The screen command is a used to launch and arrange multiple terminal shells within a single shell.
It is mainly used for two purposes:
- It can be used to run long-running commands on remote servers.
- It can be used to organise multiple shells and allow you to navigate between them.
All screen commands need to be prefixed by an escape key, which is
Ctrl-a by default.
|Basic||Starts a new session|
|Basic||Starts a new session with session name|
|Basic||Lists running screen sessions|
|Basic||Attach to a running session with name|
|Basic||Detach a running session with name|
|Basic||Attach to a screen that is already attached|
|Exiting||Detach and logout (fast way to exit screen)|
|Exiting||Quit and exits all of the programs in screen|
|Scrolling||Enter scrolling mode|
|Scrolling||Exit scrolling mode|
|Window Management||Create new window|
|Window Management||Change to last-visited active window|
|Window Management||Change to window by number (only 0-9)|
|Window Management||Change to window by number or name|
|Window Management||Change to next window in list|
|Window Management||Change to previous window in list|
|Window Management||Displays list of windows, allowing to select window to change into|
|Window Management||Rename current window|
|Window Management||Kill current window|
|Window Management||Kill all windows|
|Misc||Send Ctrl-A to screen within screen, useful when working with screen within screen|
Posted on September 06, 2021