Skip to content

Instantly share code, notes, and snippets.

@azye
Created February 27, 2020 00:08
Show Gist options
  • Save azye/dd2d6cc52f4f129c7f3c10cbc226a308 to your computer and use it in GitHub Desktop.
Save azye/dd2d6cc52f4f129c7f3c10cbc226a308 to your computer and use it in GitHub Desktop.
Learn tmux

Learn tmux

Start a new tmux session

tmux

or

tmux new -s "name_of_session"

Detach a tmux session

From within a tmux session: ctrl+b d

List tmux sessions

tmux ls

Reattach to a tmux session

tmux attach # Attach last session

or

tmux attach -t 0 # Attach session with tmux list id

or

tmux attach -t "name_of_session" # attach named session

Create a new window

ctrl+b c

Moving through windows

ctrl+b n # goes to next window
ctrl+b p # goes to previous window

Splitting session into horizontal "regions"

ctrl+b %

Splitting session into vertical regions

ctrl+b "

Moving between regions

ctrl+b arrow-key

arrow-key is the literal up, down, left, right keys.

Closing a region

ctrl+d

or

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