This shows you the differences between the selected revision and the current version of the page.
technology:unix:screen 04.14.2009 18:43 | technology:unix:screen 01.17.2019 11:21 current | ||
---|---|---|---|
Line 1: | Line 1: | ||
Screen command allows many cool things with the terminal such as: | Screen command allows many cool things with the terminal such as: | ||
- | - screen sharing with remote people / users | ||
- | - splitting of terminal into multiple shells | ||
- running executables even if terminal connection is lost | - 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) | Following are some of its options (from cmd line) | ||
<code shell> | <code shell> | ||
screen ; start an instance | screen ; start an instance | ||
- | screen -r ; reattach to an already running instance | + | screen -ls ; list running instances of screen |
- | screen -r <pid> ; reattach to a particular running instance (you may accidently have many) | + | 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 <pid> ; reattach to a particular running instance (you may accidentally have many) | ||
</code> | </code> | ||
Line 14: | Line 21: | ||
<code> | <code> | ||
Ctrl-a c ; create a new console | Ctrl-a c ; create a new console | ||
- | Ctrl-a Ctrl-\ ; Kill all windows and exit | + | Ctrl-a \ ; Kill all windows and exit |
Ctrl-a " ; list existing screens in a menu (can use up/down arrows to select) | Ctrl-a " ; list existing screens in a menu (can use up/down arrows to select) | ||
Line 29: | Line 36: | ||
Ctrl-a d ; detach from screen, but doesnt now close screens | Ctrl-a d ; detach from screen, but doesnt now close screens | ||
+ | </code> | ||
+ | |||
+ | Scrollback Mode | ||
+ | <code> | ||
+ | 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 | ||
</code> | </code> |