wiki:screen
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| wiki:screen [2020/04/29 14:01] – [Using Screen] walkeradmin | wiki:screen [2020/04/29 14:11] (current) – walkeradmin | ||
|---|---|---|---|
| Line 139: | Line 139: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | Starting a "Named Session" | + | **Starting a "Named Session" |
| \\ | \\ | ||
| \\ | \\ | ||
| Line 152: | Line 152: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | | + | When you start a new screen session, it creates a single window with a shell in it. |
| - | | + | \\ |
| + | \\ | ||
| + | You can have multiple windows inside a Screen session. | ||
| + | \\ | ||
| + | \\ | ||
| + | To create a new window with shell, type <color # | ||
| + | \\ | ||
| + | \\ | ||
| + | Below are some most common commands for managing Linux Screen Windows: | ||
| + | \\ | ||
| + | \\ | ||
| + | | ||
| + | Ctrl+a " List all window | ||
| + | Ctrl+a 0 Switch to window 0 (by number ) | ||
| + | Ctrl+a A Rename the current window | ||
| + | Ctrl+a S Split current region horizontally into two regions | ||
| + | Ctrl+a | Split current region vertically into two regions | ||
| + | Ctrl+a tab Switch the input focus to the next region | ||
| + | Ctrl+a Ctrl+a Toggle between the current and previous region | ||
| + | Ctrl+a Q Close all regions but the current one | ||
| + | Ctrl+a X Close the current region | ||
| + | \\ | ||
| + | \\ | ||
| + | **Detach from Linux Screen Session** | ||
| + | \\ | ||
| + | \\ | ||
| + | You can detach from the screen session at any time by typing: | ||
| + | \\ | ||
| + | Ctrl+a d | ||
| + | \\ | ||
| + | The program running in the screen session will continue to run after you detach from the session. | ||
| + | \\ | ||
| + | \\ | ||
| + | **Reattach to a Linux Screen** | ||
| + | \\ | ||
| + | \\ | ||
| + | To resume your screen session use the following command: (and this is the whole point of this article :) ) | ||
| + | \\ | ||
| + | screen -r | ||
| + | \\ | ||
| + | \\ | ||
| + | In case you have multiple screen sessions running on your machine, you will need to append the screen session ID after the r switch. | ||
| + | \\ | ||
| + | \\ | ||
| + | To find the session ID list the current running screen sessions with: | ||
| + | \\ | ||
| + | screen -ls | ||
| + | \\ | ||
| + | Output is: (your session numbers/ | ||
| + | \\ | ||
| + | < | ||
| + | There are screens on: | ||
| + | 10835.pts-0.linuxize-desktop | ||
| + | 10366.pts-0.linuxize-desktop | ||
| + | 2 Sockets in / | ||
| + | </ | ||
| + | \\ | ||
| + | If you want to restore screen 10835.pts-0, | ||
| + | \\ | ||
| + | screen -r 10835 | ||
| + | \\ | ||
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | ---- | ||
| + | \\ | ||
| + | Plagurised from : [[https:// | ||
| + | |||
wiki/screen.1588168909.txt.gz · Last modified: (external edit)
