linux_wiki:screen

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:screen [2014/12/08 20:39]
billdozor
linux_wiki:screen [2019/05/25 23:50] (current)
Line 1: Line 1:
 ====== Screen ====== ====== Screen ======
 +
 +**General Information**
 +
 Screen is a "full-screen window manager that multiplexes a physical terminal between several processes". (screen man page) Screen is a "full-screen window manager that multiplexes a physical terminal between several processes". (screen man page)
  
 This allows you to have multiple virtual terminal "workspaces" within 1 actual terminal session. This allows you to have multiple virtual terminal "workspaces" within 1 actual terminal session.
 +
 +**Checklist**
 +  * Distro(s): Any
 +  * Package: screen
 +
 +----
  
 ===== Install and Start ===== ===== Install and Start =====
Line 13: Line 22:
 2) Start a screen session 2) Start a screen session
 <code bash> <code bash>
-screen+screen -S MySession
 </code> </code>
  
Line 56: Line 65:
  
 You will notice that top was never interrupted, it was running the entire time on its screen session. You will notice that top was never interrupted, it was running the entire time on its screen session.
 +
 +----
  
 ==== Detach and Reattach Screen ====  ==== Detach and Reattach Screen ==== 
Line 71: Line 82:
 1) If it is not open still, start screen 1) If it is not open still, start screen
 <code bash> <code bash>
-screen+screen -s MySession
 </code> </code>
  
Line 95: Line 106:
 This will give you output similar to the following: This will give you output similar to the following:
 <code bash> <code bash>
-bill@dt-bill:~$ screen -ls+bill@dt-bill ~ $ screen -ls
 There is a screen on: There is a screen on:
- 6732.pts-1.dt-bill (11/23/2014 07:28:40 PM) (Detached)+ 19734.MySession (03/09/2015 11:13:38 PM) (Detached)
 1 Socket in /var/run/screen/S-bill. 1 Socket in /var/run/screen/S-bill.
  
-bill@dt-bill:~$ ps -ef | grep 6732 +ps -ef | grep 19734 
-bill      6732  2738  19:28 ?        00:00:00 SCREEN+bill     19734      23:13 ?        00:00:00 SCREEN -S MySession
 </code> </code>
  
 You can see that the number is indeed a process ID. You can see that the number is indeed a process ID.
  
-5) Reattach to the screen:+5) Reattach to the screen using the session name or process id:
 <code bash> <code bash>
-screen -r 6732+screen -r MySession 
 +or 
 +screen -r 19734
 </code> </code>
  
-Note: You only have to specify the screen PID if you have multiple screen sessions detached and you are connecting to a specific one.+Note: You only have to specify the screen PID if you have multiple screen sessions detached and you are connecting to a specific one. (If only 1 screen session, you can just type "screen -r")
  
 You should find your still running for loop, chugging away. You should find your still running for loop, chugging away.
 +
 +----
 +
 +==== Rename Existing Session ==== 
 +
 +If you started a new screen session without specifying a name or want to rename a session:
 +
 +1) Attach to your session
 +<code bash>
 +screen -r MySession
 +</code>
 +
 +2) Command Key, then colon
 +<code bash>
 +Ctrl+A :
 +</code>
 +
 +3) Type sessionname MyNewName, then enter
 +<code bash>
 +:sessionname MyNewName
 +</code>
  • linux_wiki/screen.1418089147.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)