Differences
This shows you the differences between two versions of the page.
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 " | Screen is a " | ||
This allows you to have multiple virtual terminal " | This allows you to have multiple virtual terminal " | ||
+ | |||
+ | **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 |
</ | </ | ||
Line 56: | Line 65: | ||
You will notice that top was never interrupted, | You will notice that top was never interrupted, | ||
+ | |||
+ | ---- | ||
==== 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 |
</ | </ | ||
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 / | 1 Socket in / | ||
- | bill@dt-bill: | + | ps -ef | grep 19734 |
- | bill | + | bill 19734 |
</ | </ | ||
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 |
<code bash> | <code bash> | ||
- | screen -r 6732 | + | screen -r MySession |
+ | or | ||
+ | screen -r 19734 | ||
</ | </ | ||
- | 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 " |
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 | ||
+ | </ | ||
+ | |||
+ | 2) Command Key, then colon | ||
+ | <code bash> | ||
+ | Ctrl+A : | ||
+ | </ | ||
+ | |||
+ | 3) Type sessionname MyNewName, then enter | ||
+ | <code bash> | ||
+ | : | ||
+ | </ |