Skip to content

Instantly share code, notes, and snippets.

@akimdi
Forked from heroheman/tmux-cheatsheet.md
Created September 4, 2019 20:19
Show Gist options
  • Save akimdi/3607195ac338059ad128f259241b9297 to your computer and use it in GitHub Desktop.
Save akimdi/3607195ac338059ad128f259241b9297 to your computer and use it in GitHub Desktop.
Tmux Simple Cheatsheet

Basic Tmux Cheatsheet

Sessions

In Bash

  • start new session: tmux
  • start new session with name: tmux new -s sessionname
  • show running sessions: tmux ls
  • attach last session: tmux a
  • attach session by name: tmux a -t sessionname
  • kill session: tmux kill-session -t sessionname
  • kill tmux-server: tmux kill-server

In Tmux

  • Prefix is Ctrl - b by default
  • create new session: Prefix :new and press Enter
  • rename session: Prefix $
  • switch to previous session: Prefix (
  • switch to next session: Prefix )
  • list sessions and switch to selection: Prefix s

Windows

  • create new window: Prefix c
  • rename current window: Prefix ,
  • list session windows: Prefix w
  • got to window with number: Prefix <NUMBER>
  • kill window: Prefix &

Panes

  • create horizontal split: Prefix %
  • create vertical split: Prefix "
  • Zoom In/Out in current pane: Prefix z
  • kill current pane: Prefix x
  • go to next pane: Prefix o
  • show pane numbers: Prefix q
  • go to adjacent pane: Prefix <Arrow Key>
  • toggle pane layout: Prefix <Space>

Resizing Panes

  • you can access the Prompt by hitting: Prefix :
  • resize windows: `resize-pane [DIRECTION] [NUMBER OF CELLS]
  • Directions: D U L R (down, up, left, right)
  • eg: resize-pane -L 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment