Tmux

Frequently used for tmux

Recipes

  • Ctrl+b " β€” split pane horizontally.

  • Ctrl+b % β€” split pane vertically.

  • Ctrl+b arrow key β€” switch pane.

  • Hold Ctrl+b, don’t release it and hold one of the arrow keys β€” resize pane.

  • Ctrl+b c β€” (c)reate a new window.

  • Ctrl+b n β€” move to the (n)ext window.

  • Ctrl+b p β€” move to the (p)revious window.

To create session

tmux new -s sess_name

To attach a session

tmux a -t sess_name

To create a session in detached mode

tmux new -d -s sess_name

To send commands to a session to the pane 0

tmux send-keys -t sess_name.0 "pwd" ENTER

To split panes horizontally in detached mode 1(right) and 0(left)

tmux splitw -h -p 50 -t sess_name:1.0

To kill tmux server

tmux kill-server

To kill tmux session

tmux kill-session -t sess_name

To kill all other sessions from a session

tmux kill-session -a

Resources

Last updated