Screen command allows many cool things with the terminal such as:
- running executables even if terminal connection is lost
- screen sharing with remote people / users (screen and screen -x)
- splitting of terminal into multiple shells (Ctrl-a S)
- its installed on most distros already
Alternates:
- TMUX https://tmux.github.io/
Following are some of its options (from cmd line)
screen ; start an instance
screen -ls ; list running instances of screen
screen -x ; attach to an active screen; used for sharing the same shell with another person
screen -r ; reattach to an already running non-active instance; used if you left some screens and now want to come back to them
screen -r ; reattach to a particular running instance (you may accidentally have many)
Following are some of its commands (once running screen)
Ctrl-a c ; create a new console
Ctrl-a \ ; Kill all windows and exit
Ctrl-a " ; list existing screens in a menu (can use up/down arrows to select)
Ctrl-a ; Switch to a screen, where is the number of the screen
Ctrl-a Ctrl-a ; Switch to prior screen
Ctrl-a S ; Split screen (regions); do it again to keep splitting
Ctrl-a tab ; move between splits
Ctrl-a X ; close a split (region)
Ctrl-a s ; freeze screen
Ctrl-a q ; unfreeze
Ctrl-a d ; detach from screen, but doesnt now close screens
Scrollback Mode
Ctrl-a [ ; enter scroll-back mode
Esc ; exits scroll-back mode
C-b ; Scrolls a full page up.
C-f ; Scrolls the full page down.
j ; Move the cursor down by one line
k ; Move the cursor up by one line