screen
is a linux software to handle background tasks. While it is very powerful, the shortcuts to move around the tool can be a challenge to remember.
This is my reference to do the most common tasks.
From the outside
screen
will create a new screen sessionscreen -ls
will list out all active screen sessionscreen -r
will re-attach to an existing screen (if there are multiple session running, you will need to provide the session ID)
# screen -ls
There is a screen on:
30741.pts-1.mercury (10/22/2022 03:46:15 PM) (Detached)
From the inside
All shortcuts are prefixed with CTRL+A
to avoid conflicting with other shell shortcuts
CTRL+a, d
detaches the screen session and returns you to the standard shellCTRL+a, c
creates a new shell inside this sessionCTRL+a, n
moves you to the next shellCTRL+a, p
moves you to the previous shellCTRL+a, CTRL+a
moves you to the previously used shellCTRL+a, w
allows you to rename the current shell
All screen
shortcuts start with CTRL + a
plus another key (or combination of keys).
CTRL + a, d
Detatch from the current session and return to the "real" terminal.
CTRL + a, a
Toggle to the previous window.
CTRL + a, c
Create a new terminal session.
CTRL + a, p
Focus the previous window.
CTRL + a, n
Focus the next window.
CTRL + a, "
Show a list of all windows.
CTRL + a, A
Prompt for a new name for this window.
CTRL + a, N
Show the name and index of the current window.
CTRL + a, ?