Skip to content

TMUX - Let's Multitask

Getting Started

Before doing anything I recommend you getting oh-my-tmux.

cd ~
git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
cp .tmux/.tmux.conf.local .

However if you can not for whatever reason vanilla tmux and oh-my-tmux share almost all the same keybindings.

Starting Tmux

New Session

tmux
tmux new -s myname # New Named Session

Joining a Session

tmux ls # List the sessions
tmux -a X # X is the session number
tmux -a -t myname # Join a session by name

Ending a Session

tmux kill-session -t myname

Using TMUX

In tmux, you have to prefix ctrl+b each command you do. That way it knows when you're giving tmux a command vs just typing out something.

Session Management

:new<CR> new session
s list sessions
$ name session

## Windows (tabs)

c           new window
,           name window
w           list windows
f           find window
&           kill window
.           move window - prompted for a new number
:movew<CR>  move window to the next unused number

## Panes (splits)

%  horizontal split
"  vertical split

o  swap panes
q  show pane numbers
x  kill pane
⍽  space - toggle between layouts

## Window/pane Surgery

:joinp -s :2<CR>  move window 2 into a new pane in the current window
:joinp -t :1<CR>  move the current pane into a new pane in window 1

## Misc

d  detach
t  big clock
?  list shortcuts
:  prompt