OSDN Git Service

Regular updates
[twpd/master.git] / screen.md
1 ---
2 title: Screen
3 category: CLI
4 layout: 2017/sheet
5 updated: 2020-12-05
6 keywords:
7   - Screen
8   - Linux
9   - Unix
10   - CLI
11   - Command
12   - Line
13 intro: |
14   Screen or GNU Screen is a terminal multiplexer. In other words, it means that you can start a screen session and then open any number of windows (virtual terminals).
15   This does not contain **all** of screen's commands and options, read [GNU's manual](https://www.gnu.org/software/screen/manual/screen.html#Commands) to see everything
16 ---
17
18 ## Basics
19 {: .-three-column}
20
21 ### CLI Options
22
23 | Options           | Description                               |
24 | ----------------- | ----------------------------------------- |
25 | `-S`              | Starts a named session                    |
26 | `-r [name]`       | Reattach to a screen (optionally by name) |
27 | `-ls` or `--list` | Returns a list of session ids             |
28
29 ### Screens
30
31 | Keybind         | Description                                                                              |
32 | --------------- | ---------------------------------------------------------------------------------------- |
33 | `ctrl+a c`      | Create a new screen tab inside a screen                                                  |
34 | `ctrl+a [0-9]`  | Switch to a screen tab by number 0 through 9                                             |
35 | `ctrl+a n`      | Go to the next screen tab                                                                |
36 | `ctrl+a p`      | Go to the previous screen tab                                                            |
37 | `ctrl+a k`      | Kill current screen tab                                                                  |
38 | `ctrl+a ctrl+d` | Detach the current screen and go back to the terminal (screen windows will stay running) |
39
40 ### Visual pleasure
41
42 | Keybind                         | Description                  |
43 | ------------------------------- | ---------------------------- |
44 | `ctrl+a S`                      | Split a screen horizontally  |
45 | `ctrl+a |`                      | Split a screen vertically    |
46 | `ctrl+a ctrl+I` or `ctrl+a tab` | Change screen split          |
47 | `ctrl+a Q`                      | Remove all screen splits     |
48 | `ctrl+a C`                      | Clear the current screen tab |
49
50 ### Accessibility
51
52 | Keybind         | Description                                         |
53 | --------------- | --------------------------------------------------- |
54 | `ctrl+a A`      | Rename current screen tab                           |
55 | `ctrl+a k`      | Kill current screen tab                             |
56 | `ctrl+a ctrl+a` | Switch to last used screen tab                      |
57 | `ctrl+a a`      | Send `ctrl+a` to current screen tab                 |
58 | `ctrl+a ctrl+w` | See a list of all screen tabs in the current screen |