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!

General controls

Default bind-key
^b (ctrl+b)
Enter a tmux command prompt
^b :

Sessions

Start a new session
tmux
Attach to default session
tmux a
List existing sessions
tmux ls
Rename current session
^b $
Detach current client
^b d
Detach other clients
^b D

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.
 

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.

Tmux command prompt

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

Config file for custom­ization

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

# Enable mouse support
set -g mouse on

# Set panel border 'red' to active window
#set -g pane-active-border-style bg=red

# Set background 'red' to active window
#set -g window-active-style bg=red
Put this config in ~/.tmu­x.conf file.
       

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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 Cheat Sheet
          tmux - terminal multiplexer Keyboard Shortcuts