tmux - yszheda/wiki GitHub Wiki
(user1)$ tmux -S /tmp/shareds new -s shared
(user1)$ chgrp joint /tmp/shareds
(user2)$ tmux -S /tmp/shareds attach -t shared
# read-only
(user2)$ tmux -S /tmp/shareds attach -t shared -r
# Vertically
select-layout even-vertical
<C-b> <M-2>
# Horizontally
select-layout even-horizontal
<C-b> <M-1>
<prefix> D
tmux a -dt <session-name>
setw -g mode-keys vi
-
h / j / k / l
to move left/down/up/right -
w / W / e / E / b / B
to move forward to the start / to the end / backward a word or WORD -
{ / }
to move backward / forward a paragraph -
Ctrl + e / d / f
to scroll down a line / half screen / whole screen -
Ctrl + y / u / b
to scroll up a line / half screen / whole screen -
/ / ?
to search forward / backward -
n / N
to repeat the previous search forward / backward
By default,
~/.bashrc
is used in an interactive, non-login shell. It won't be sourced in a login shell. Tmux uses a login shell by default. Hence, shells started by tmux skip~/.bashrc
.