Tmux Installation Guide
Tmux Installation Guide
Tmux is a terminal multiplexer that allows you to run multiple terminal sessions in a single window.
Installation
Ubuntu/Debian
sudo apt update
sudo apt install -y tmux
Fedora
sudo dnf install -y tmux
Arch Linux
sudo pacman -S tmux
From Source
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make
sudo make install
Verification
tmux -V
Basic Usage
tmux # Start new session
tmux new -s mysession # Start named session
tmux ls # List sessions
tmux attach # Attach to session
tmux attach -t name # Attach to named session
Common Keybindings
| Keybinding | Action |
|---|---|
Ctrl+b d |
Detach from session |
Ctrl+b % |
Split vertically |
Ctrl+b " |
Split horizontally |
Ctrl+b o |
Switch panes |
Ctrl+b c |
Create new window |
Ctrl+b n |
Next window |
Ctrl+b p |
Previous window |
Ctrl+b [ |
Copy mode |