Project URL: https://tmux.github.io/
Tmux is a newer take on screen.
tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.
My usage pattern
And/or:
- Locally in one or more of terminal tabs. This keeps number of terminal tabs sane. I mostly use splits and occasionally tabs inside tmux.
- Remotely for avoiding multiple ssh connections, critical tasks, poor connection.
I’d recommend these navigation keys:
bind-key -n C-Left select-pane -L bind-key -n C-Right select-pane -R bind-key -n C-Up select-pane -U bind-key -n C-Down select-pane -D bind-key -n C-S-Left switch-client -p bind-key -n C-S-Right switch-client -n bind-key -n S-Left prev bind-key -n S-Right next bind-key -n M-j prev bind-key -n M-k next bind-key -n C-M-z resize-pane -Z
For a remote machine I suggest setting pane navigation keys to M-Left/Right/Up/Down. This way instead of hitting Ctrl+b C-Left
or worse Ctrl+b Ctrl+b Left
you just hit Alt+Left
(aka Meta+Left
).
Pros
- Zoom mode.
- Saner default prefix key
Ctrl+b
as opposed to screen’sCtrl+a
. Outside screenCtrl+a
usually jumps to beginning of a line and I use this shortcut frequently. - Multiple copy buffers. See the
prefix =
shortcut in the manual.
Cons
- Mouse selection and scrolling behaves different than in plain terminal. The regular mouse selection can be done with Shift but still…
- I have not automated setting up remote machines’ tmux.conf automatically yet. That would be a huge win.