Skip to content

Instantly share code, notes, and snippets.

@thewheat
Last active March 18, 2021 07:38
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 thewheat/2300fb6b7728e68ac2b39e75b7e94d86 to your computer and use it in GitHub Desktop.
Save thewheat/2300fb6b7728e68ac2b39e75b7e94d86 to your computer and use it in GitHub Desktop.
Commands for screen/tmux

screen

  • Ctrl + a, c: create new screen
  • Ctrl + a, a: switch to previous screen
  • Ctrl + a, ": list all screens
  • Ctrl + a, NumberX : switch to screen #NumberX
  • screen -ls: list all sessions
  • screen -rad ID: reattach

tmux

Panes

  • Ctrl + b, ": split pane in half horizontally
  • Ctrl + b, %: split pane in half veritically
  • Ctrl + b, o: go to next pane
  • Ctrl + b, Arrow: go to pane
  • Ctrl + b, x: kill pane
  • Ctrl + b, z: toggle pane zoom mode (full screen)

Windows

  • Ctrl + b, c: create new window
  • Ctrl + b, NumberX : switch to window #NumberX
  • Ctrl + b, ,: name window

General

  • Ctrl + b, $: rename session
  • Ctrl + b, d: detach session
  • tmux ls: list all sessions
  • tmux attach -t numberOrNameInList: reattach session
  • Ctrl + :: Command mode (to enter
  • set-option -g mouse on [in config ($HOME/.tmux.conf) or in Command mode]: Allow mouse scrolling # https://superuser.com/a/1211928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment