Skip to content

Instantly share code, notes, and snippets.

@erikcox
Last active February 17, 2016 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikcox/5f470fc2939e7f8d5d80 to your computer and use it in GitHub Desktop.
Save erikcox/5f470fc2939e7f8d5d80 to your computer and use it in GitHub Desktop.
tmux notes
tmux new -s session_name -n window_name # Creates a new session with a named window
tmux attach -t session_name # Attaches to tmux session
tmux ls # Lists all tmux sessions
#PREFIX is Ctrl-b by default
PREFIX ? # Lists all commands available
PREFIX d # Detaches window
PREFIX c # New window
PREFIX , # Rename window
PREFIX n # Next window
PREFIX p # Previous window
PREFIX 0...9 # Go to window number
PREFIX q # Momentarily displays pane numbers in each pane
PREFIX f # Find a window by name
PREFIX w # List all windows
PREFIX & # To close a window (alternatively type 'exit')
PREFIX % # Split a pane vertically (- in custom binding)
PREFIX " # Split a pane horizontally (| in custom binding)
PREFIX o (or arrow keys) # To switch between panes
PREFIX spacebar # Cycle through layouts
PREFIX x # Kills a pane
PREFIX : # Command mode
PREFIX [ # Start scroll mode
q # exit scroll mode
Resizing - (replace two with any value)
PREFIX B :resize-p -D 2
PREFIX B :resize-p -U 2
PREFIX B :resize-p -L 2
PREFIX B :resize-p -R 2
# Reload tmux conf file
$ tmux source-file ~/.tmux.conf
# Trackpad scrolling and mouse selection in OSX
setw -g mode-mouse on
set -g mouse-select-pane on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment