Skip to content

Instantly share code, notes, and snippets.

@rocktimsaikia
Last active March 21, 2022 17:25
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 rocktimsaikia/49f692dab18bd864ccf237fac8af88bd to your computer and use it in GitHub Desktop.
Save rocktimsaikia/49f692dab18bd864ccf237fac8af88bd to your computer and use it in GitHub Desktop.

Tmux cheatsheet

ctrl+b+" = Splits the window horizantally
ctrl+c+% = Splits the window vertically
ctrl+d = Drop the current pane
ctrl+b+<arrows> = to switch between pages
ctrl+b+z = Zoom in and out in the current pane
ctrl+b+c = Create a new window
ctrl+b+p = Go to the previous window
ctrl+b+n = Go to the next window
ctrl+b+& = Drop/kill the current window (Interactive)
ctrl+b+, = Rename the current window
ctrl+b+d = Disconnet from your current session
ctrl+b+$ = Rename the current session
ctrl+b :new = create a new session within within another session

Tmux terminal commands

tmux = Create a tmux session
tmux new -s <session_name> = Create a tmux session and name it at the same time
tmux ls = List all active sessions
tmux a = Reconnect to the latest session
tmux a -t <session_name> = Reconnect to a specific session by passing the session name

My faviorite command

ctrl+b+s = Enter interactive mode. Now you can preview sessions and select them without any other commands

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