Package Managers:
# macOS
brew install tmux # Homebrew
port install tmux # MacPorts
# Linux
apt install tmux # Debian/Ubuntu
yum install tmux # RHEL/CentOS
dnf install tmux # Fedora
pacman -S tmux # Arch
zypper install tmux # openSUSE
From Source:
wget <https://github.com/tmux/tmux/releases/download/3.3a/tmux-3.3a.tar.gz>
tar xzvf tmux-3.3a.tar.gz
cd tmux-3.3a
./configure
make && sudo make install
CLI Commands:
tmux # Start new session
tmux new -s name # Start named session
tmux ls # List sessions
tmux a # Attach to last session
tmux a -t name # Attach to named session
tmux kill-session -t name # Kill specific session
tmux kill-server # Kill all sessions
Keybindings:
Ctrl+b d - Detach from sessionCtrl+b s - List/switch sessionsCtrl+b $ - Rename sessionCtrl+b c - Create windowCtrl+b w - List windowsCtrl+b n - Next windowCtrl+b p - Previous windowCtrl+b 0-9 - Go to window number