Skip to content

Instantly share code, notes, and snippets.

@geocarvalho
Last active April 16, 2021 14:55
Show Gist options
  • Save geocarvalho/55e5d50763d0f46c94e388544ea8ba76 to your computer and use it in GitHub Desktop.
Save geocarvalho/55e5d50763d0f46c94e388544ea8ba76 to your computer and use it in GitHub Desktop.
Tmux help commands

session management

tmux ls (or tmux list-sessions)
tmux new -s session-name
Ctrl-b d Detach from session
tmux attach -t [session name] or tmux a -t [session name]
tmux kill-session -t session-name

Ctrl-b c Create new window
Ctrl-b d Detach current client
Ctrl-b l Move to previously selected window
Ctrl-b n Move to the next window
Ctrl-b p Move to the previous window
Ctrl-b & Kill the current window
Ctrl-b , Rename the current window
Ctrl-b q Show pane numbers (used to switch between panes)
Ctrl-b o Switch to the next pane
Ctrl-b ? List all keybindings

moving between windows

Ctrl-b n (Move to the next window)
Ctrl-b p (Move to the previous window)
Ctrl-b l (Move to the previously selected window)
Ctrl-b w (List all windows / window numbers)
Ctrl-b window number (Move to the specified window number, the
default bindings are from 0 -- 9)

Tiling commands

Ctrl-b shift+% (Split the window vertically)
CTRL-b shift+" (Split window horizontally)
Ctrl-b shift+o (Goto next pane)
Ctrl-b shift+q (Show pane numbers, when the numbers show up type the key to go to that pane)
Ctrl-b shift+{ (Move the current pane left)
Ctrl-b shift+} (Move the current pane right)

Make a pane its own window

Ctrl-b : "break-pane"

add to ~/.tmux.conf

# Change pane on mouse click
set -g mouse-select-pane on

# History buffer size
set-option -g history-limit 3000

  • Credits:

Basic tmux Tutorial - Windows, Panes, and Sessions over SSH

tmux shortcuts & cheatsheet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment