2014-11-02 10:34:19 +02:00
|
|
|
# tmux
|
|
|
|
|
2023-12-28 07:12:36 -03:00
|
|
|
> Terminal multiplexer.
|
|
|
|
> It allows multiple sessions with windows, panes, and more.
|
|
|
|
> See also: `zellij`, `screen`.
|
2019-06-03 02:06:36 +02:00
|
|
|
> More information: <https://github.com/tmux/tmux>.
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2020-02-12 04:48:30 -07:00
|
|
|
- Start a new session:
|
2014-11-02 10:34:19 +02:00
|
|
|
|
|
|
|
`tmux`
|
|
|
|
|
2025-05-03 18:38:54 +03:00
|
|
|
- Start a new named [s]ession:
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2025-05-03 18:38:54 +03:00
|
|
|
`tmux {{[new|new-session]}} -s {{name}}`
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2020-02-12 04:48:30 -07:00
|
|
|
- List existing sessions:
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2025-05-03 18:38:54 +03:00
|
|
|
`tmux {{[ls|list-sessions]}}`
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2020-02-12 04:48:30 -07:00
|
|
|
- Attach to the most recently used session:
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2025-05-03 18:38:54 +03:00
|
|
|
`tmux {{[a|attach]}}`
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2020-11-21 02:55:15 +00:00
|
|
|
- Detach from the current session (inside a tmux session):
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2025-03-09 03:23:24 +02:00
|
|
|
`<Ctrl b><d>`
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2020-11-21 02:55:15 +00:00
|
|
|
- Create a new window (inside a tmux session):
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2025-03-09 03:23:24 +02:00
|
|
|
`<Ctrl b><c>`
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2020-11-21 02:55:15 +00:00
|
|
|
- Switch between sessions and windows (inside a tmux session):
|
2014-11-02 10:34:19 +02:00
|
|
|
|
2025-03-09 03:23:24 +02:00
|
|
|
`<Ctrl b><w>`
|
2018-01-27 09:16:07 +01:00
|
|
|
|
2025-05-03 18:38:54 +03:00
|
|
|
- Kill a session by [t]arget name:
|
2018-01-27 09:16:07 +01:00
|
|
|
|
2020-11-21 02:55:15 +00:00
|
|
|
`tmux kill-session -t {{name}}`
|