2022-01-16 18:20:39 +00:00
|
|
|
---
|
|
|
|
title: "tmux"
|
2022-01-26 22:35:07 +00:00
|
|
|
tags: [ "Documentation", "System" ]
|
2022-01-16 18:20:39 +00:00
|
|
|
---
|
2020-01-02 00:04:35 +00:00
|
|
|
Start with:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
tmux
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
|
|
|
Input a command with C-b
|
|
|
|
|
|
|
|
In addition to Windows, there are panes.
|
|
|
|
|
|
|
|
|Commands | Key |
|
|
|
|
| ---- | ---- |
|
|
|
|
| New Window | c |
|
|
|
|
| Previous Window | p |
|
|
|
|
| next window | n |
|
|
|
|
| list windows | w |
|
|
|
|
| vertical split | % |
|
|
|
|
| horizontal split | " |
|
|
|
|
| name a command | : |
|
|
|
|
| kill pane | x |
|
|
|
|
| kill session | d |
|
|
|
|
|
|
|
|
|
|
|
|
|Name Commands|
|
|
|
|
| --------|
|
|
|
|
| split-window |
|
|
|
|
| rename-window |
|
|
|
|
|
|
|
|
# Sessions
|
|
|
|
|
|
|
|
Crate a new session with the name 'backup'.
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
tmux new -s backup
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
|
|
|
List sessions:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
tmux list-sessions
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
tmux kill-session -t 2
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
tmux attach -t backup
|
|
|
|
```
|
2020-01-02 00:04:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Control
|
|
|
|
|
|
|
|
Resize Panes with ^b then Esc+[direction].
|
|
|
|
|