tmux
Timeline
2025-10-20
init
tmux Installation
1 | sudo pacman -Sy tmux |
If using WSL, you can configure it to start tmux on launch by appending -- tmux to the command line options in the Archlinux settings.
tmux Configuration
Install tpm:
1 | git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm |
Configuration file ~/.tmux.conf:
1 | # Set prefix key to Ctrl+q |
Then press C-q I to download the plugins.
Common Shortcuts
Session Management
| Command/Shortcut | Description |
|---|---|
tmux new -s <name> |
Create a new session named name |
Ctrl+q d |
Detach current session (continues in background) |
tmux ls |
List all sessions |
tmux attach -t <name> |
Reattach to a specified session |
Ctrl+q $ |
Rename current session |
Ctrl+q s |
Switch session |
Window Management
| Command/Shortcut | Description |
|---|---|
Ctrl+q c |
Create new window |
Ctrl+q & |
Close current window |
Ctrl+q n |
Switch to next window |
Ctrl+q p |
Switch to previous window |
Ctrl+q <number> |
Switch to window by number |
Ctrl+q , |
Rename current window |
Pane Management
| Command/Shortcut | Description |
|---|---|
Ctrl+q % |
Split vertically |
Ctrl+q " |
Split horizontally |
Ctrl+q <arrow> |
Move focus between panes |
Ctrl+q x |
Close current pane |
Ctrl+q z |
Maximize/restore current pane |
Ctrl+q Space |
Switch pane layout |
History
In tmux, “history mode” is copy-mode. Once entered, you can:
- Use arrow keys to scroll through history (arrows or C-p C-n)
- Use mouse wheel to scroll
Press:
Ctrl + b [
All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Comments