Home

tmux

tmux (Terminal Multiplexer). It allows users to manage multiple terminal sessions from a single window.

Configuration location: ~/.tmux.conf

Hotkeys, shortcuts

  • ctrl+b c Create a new window
  • ctrl+b n & ctrl+b p Go to next window, Go to previous window
  • ctrl+[ Enter copy mode (allows scrolling)
    • scroll using ctrl+u & ctrl+d
    • / search
    • q to exit copy mode
  • ctrl+b d Detatch from current session in current terminal

Windows/panes:

  • ctrl+b space: Change layout (vertical / horizontal)
  • ctrl+b ,: rename window
  • ctrl+b alt+2: Vertically balance out split pane sizes
  • ctrl+b alt+1: Horizontally balance out split pane sizes

Split panes:

  • ctrl+j or ctrl+k: Focus on top/bottom pane (go to)
  • ctrl+": Create new window in horizontal split screen
  • ctrl+UP or ctrl+Down: Change size of the current split pane
  • ctrl+!: Move split pane into its own window

Commands, actions

To enter command mode use: ctrl+b :

  • move-window -t [num]: move the current window to a new window number

???

  • -d: any other clients attached to the session are detached
  • -t: attach to target with name:id
  • -n: name the window
tmux new-window -t hawkhost:1 -n 'Server1' 'ssh root@10.x.x.x'

# 
tmux new-session -d 'vi /etc/passwd' \; split-window -d \; attach

Docs

Cheatsheet

Blogs

Wiki

Date:

Screen Dimensions