iTerm: ssh + force pseudo-terminal allocation
ssh login@hostname -t 'tmux -CC'
Creating Windows:
- Press
Ctrl+b
, then c
to create a new window.
Ctrl+b
, :
You can also create windows with specific names by pressing Ctrl+b
, then :
to enter the command mode, and typing new-window -n window_name
.
Switching between Windows:
Ctrl+b
, n
to switch to the next window.
Ctrl+b
, p
to switch to the previous window.
Ctrl+b
, then the window number (starting from 0).
Splitting Panes:
Ctrl+b
, %
to split the current pane vertically.
Ctrl+b
, "
to split the current pane horizontally.
Navigating Panes:
Ctrl+b
, then arrow keys to switch between panes.
Ctrl+b
, o
to cycle through panes.
Resizing Panes:
- Press
Ctrl+b
, then hold Ctrl
and use arrow keys to resize panes.
Detaching and Attaching Sessions:
Ctrl+b
, d
:To detach from a TMUX session, press
Ctrl+d
, kill
tmux attach
or just tmux a
to attach to a detached session, simply run .
Other Useful Commands:
tmux ls
: List all TMUX sessions.
tmux kill-session -t session_name
: Kill a specific TMUX session.
Ctrl+b
, ,
- rename window, or tmux display-message -p "#W"
Ctrl+b
, $
- rename session
Ctrl+b
, s
- session switch (interactive with preview)
Ctrl+b
, space - cycle through s0plit view
Ctrl+b
, z
- zoom to full screen
Ctrl+b
, [
- go into copy/nav mode
Leave a comment