User Tools

Site Tools


wiki:screen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wiki:screen [2020/04/29 14:57] – [Using Screen] walkeradminwiki:screen [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 24: Line 24:
 \\  \\ 
 \\  \\ 
-From a terminal in Linux, enter the following:+From a terminal in Linux, enter the following: 
 \\  \\ 
     screen --version     screen --version
Line 101: Line 101:
     screen     screen
 \\  \\ 
-\\  +You can check what screen commands are available by: Press <color #00a2e8>CTRL+a</color> (let go of all keys) then hit <color #00a2e8>?</color>
-You can check what screen command are available by:+
  
 <file> <file>
-Press CTRL+a (let go of all keys) then hit ? 
                                                      Screen key bindings, page 1 of 1.                                                      Screen key bindings, page 1 of 1.
  
Line 138: Line 136:
 |    split -v |    split -v
 :kB: focus prev :kB: focus prev
- 
 </file> </file>
-     +\\  
-    +\\  
 +**Starting a "Named Session"** 
 +\\  
 +\\  
 +You can name your screen sessions, which makes it easier to find the one you were in, you can do this using the following syntax: 
 +\\  
 +    screen -S session_name 
 +\\  
 +For example <color #ed1c24>screen -S Orca</color> 
 +\\  
 +\\  
 +You will not see a lot happen, but a new window has opened and you are in a new session. 
 +\\  
 +\\  
 +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 #ed1c24>Ctrl+a</color> then <color #ed1c24>c</color>, the first available number from the range 0...9 will be assigned to it. 
 +\\  
 +\\  
 +Below are some most common commands for managing Linux Screen Windows: 
 +\\  
 +\\  
 +    Ctrl+a c Create a new window (with shell) 
 +    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/names will differ) 
 +\\  
 +<file> 
 +There are screens on: 
 +    10835.pts-0.linuxize-desktop   (Detached) 
 +    10366.pts-0.linuxize-desktop   (Detached) 
 +2 Sockets in /run/screens/S-linuxize. 
 +</file> 
 +\\  
 +If you want to restore screen 10835.pts-0, then type the following command: 
 +\\  
 +    screen -r 10835 
 +\\  
 +\\  
 +\\  
 + 
 +---- 
 +\\  
 +Plagurised from : [[https://linuxize.com/post/how-to-use-linux-screen/]] (i do this in case their site goes down/gets closed etc). 
 + 
wiki/screen.1588168633.txt.gz · Last modified: 2023/03/09 22:35 (external edit)