List of 50+ tmux cheatsheet and shortcuts commands

In this tutorial I have consolidated a bunch of tmux cheatsheets and shortcuts which can help you with your time with tmux.

 

Recommended Read

I would recommend reading these articles on tmux to get more details on the commands used in these shortcuts from this article:
Complete tutorial on tmux commands with examples from scratch
10 practical examples of tmux configuration with examples

 

tmux cheatsheet for sessions

CommandDetails
$tmuxCreate new session with default session name
$tmux newCreate new session with default session name
$tmux new-sessionCreate new session with default session name
$tmux new -s session_nameCreates a new session called “session_name.”
Ctrl+b :Enters command mode
Ctrl+b :new -s session_nameCreates new session within an existing session
$tmux lsList active tmux sessions
$tmux list-sessionsList active tmux sessions
Ctrl+b sList active tmux sessions
$tmux a -t session_nameAttaches to session by the name "session_name"
$tmux at -t session_nameAttaches to session by the name "session_name"
$tmux attach -t session_nameAttaches to session by the name "session_name"
$tmux attach-session -t session_nameAttaches to session by the name "session_name"
$tmux kill-ses -t session_nameKills session by the name "session_name"
$tmux kill-session -t session_nameKills session by the name "session_name"
Ctrl+b dDetaches from the session, leaving the session running in the background.
Ctrl+b $Rename the session name
Ctrl+b (Move to the previous session
Ctrl+b )Move to the next session

 

tmux cheatsheet for windows

Prefix CommandDetails
Ctrl+b cCreates a new window from within an existing tmux session
Ctrl+b wDisplays a list of windows in the current session
Ctrl+b nMoves to the next window
Ctrl+b pMoves to the previous window
Ctrl+b 0..9Selects windows by number
Ctrl+b lGo to the last window
Ctrl+b ,Displays a prompt to rename a window
Ctrl+b &Closes the current window after prompting for confirmation
Ctrl+b xCloses the current window after prompting for confirmation
Ctrl+b fSearches for a window that contains the text you specify

 

tmux cheatsheet for panes

Prefix CommandDetails
Ctrl+b %Divides the current window in half vertically.
Ctrl+b "Divides the current window in half horizontally
Ctrl+b oCycles through open panes
Ctrl+b qMomentarily displays pane numbers in each pane
Ctrl+b xCloses the current pane after prompting for confirmation
Ctrl+b &Closes the current window after prompting for confirmation
Ctrl+b &Closes the current window after prompting for confirmation
Ctrl+b SpaceCycles through the various pane layouts
Ctrl+b {Move the current pane to left
Ctrl+b }Move the current pane to right
Ctrl+b Switch to the pane above the current pane
Ctrl+b Switch to the pane below the current pane
Ctrl+b Switch to the pane on the left side of the current pane
Ctrl+b Switch to the pane on the right side of the current pane
Ctrl+b zToggle pane zoom
Ctrl+b !Combine and Convert all the panes into single window
Ctrl+b :setw synchronize-panesTo synchronise all the panes
Ctrl+b :setw synchronize-panes offTo turn off synchronisation between all the panes

 

tmux help

Prefix CommandDetails
Ctrl+b ?Show the list of bind options
Ctrl+sIn the bind help section search for string

 

Conclusion

In this tmux cheatsheet tutorial I have tried to consolidate all the most used shortcuts and tmux commands into a single page. There are many other key combinations which can be used with tmux and those can be easily accessed with the man page of tmux.

Lastly I hope this tmux cheatsheet was helpful. So, let me know your suggestions and feedback using the comment section.

 

Leave a Comment

Please use shortcodes <pre class=comments>your code</pre> for syntax highlighting when adding code.