Show Menu
Cheatography

Are you a command line user? Do you long-running jobs via the terminal you don't want to close even if you accidentally lose your connection? If so, tmux is for you!

Sessions

Start a new session
tmux
Attach to default session
tmux a
List existing sessions
tmux ls
Detach current client
^b d
Detach other clients
^b D
Rename the current session
^b $
Note: ^b is the default bind-key ctrl+b.

Windows (tabs)

Create a new window
^b c
Next window
^b n
Previous window
^b p
Select a window intera­ctively
^b w
Rename the current window
^b ,
Kill the current window
^b &
In the status bar (bottom) are the number­­/name of window­s.

Tmux prompt commands

Enter a tmux command prompt
^b :
Toggle broadcast to all panes
setw synchr­oni­ze-­panes
 

Panes (verti­­ca­l­/­ho­­riz­­ontal splits)

Split current pane vertically
^b %
Split current pane horizo­­ntally
^b "
Navigate around panes
^b <arrow keys>
Resize the current pane
^b ^<arrow keys>
Swap pane location
^b ^o
Send the current pane to a new window
^b !
Toggle zoom current pane
^b z
Arrange panes in a tiled layout
^b alt+5
Arrange to a next preset layout
^b <sp­ace>
Kill current pane
^b x
There are many other key-bi­­ndings for resizing panes that are worth learning, but out of scope for a basic cheats­­heet.

Config file for custom­ization

# Shortcut to 'synchronize panes' with '^b ='
bind = set -g synchronize-panes

# Enable mouse support
set -g mouse on
Save this config­uration in the ~/.tmu­x.conf file.
       
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          tmux the terminal multiplexer Cheat Sheet
          tmux - terminal multiplexer Keyboard Shortcuts
          Tmux Cheat Sheet