Tmux Basics Cheatsheet
Published on
These are the most common commands I use in Tmux, all with the default configuration.
List existing tmux sessions
tmux ls
Create a new tmux session names statamic
tmux new -s statamic
The default command prefix is C-b (Ctrl and ‘b’ simultaneously).
Attach to the most recent session
tmux attach
Attach to the session named statamic
tmux attach -t statamic
Enable mouse control by entering the tmux command line with C-b : and enter
set -g mouse on
Mouse control allows selecting windows with the mouse and scrolling to work as expected.
Important key commands
C-b c- create a new windowC-b ,- rename the current windowC-b $- rename the current sessionC-b d- detach from tmux sessionC-b 1throughC-b 9- switch to the corresponding windowC-b '- will prompt for the window number to switch toC-b pandC-b n- switch to the previous and next windows, respectively