Notebook tmux

Called “Terminal Multiplexer”, if you want simple definition, it is like another shell in the shell, mate. If you would like to keep a task running before leaving the ssh session, tmux is your tool. There is also ‘screen‘, ‘Konsole‘ etc… but I learned tmux.

List all your tmux sessions

~> tmux ls

Attach to the last session

~> tmux attach

Attach to the specific session with their ID numbers

~> tmux attach -t 65536

You are attached, feel a bit stucked inside?

Using shortcuts

Detach from inside out, jump back to default shell, like exiting without closing

[ctrl+b]; [d]

Split tmux screen horizontal

[ctrl+b]; [“]

Split tmux screen vertical

[ctrl+b]; [%]

Jump between the windows

[ctrl+b]; [o]

Swap Panes

-D for clockwise, -U is for couter-clockwise.

[ctrl+b]; [:], swap-pane -[D/U]

You can’t use PageUp and PageDown buttons directly inside?

Resize panes

Which applies to the focused one. Get down to command line of tmux, like in vim, add number as amount of lines or chars to resize when necessary, 10 is example.

[ctrl+b]; [:], resize-pane -[D/U/L/R] <10>

Scroll inside the pane

[ctrl+b]; [PageUp/PageDown]

Leave scrolling session

[q]

Kill specific sessions

~> tmux kill-session -t <session_id/session_name>

Kill all sessions at once

~> tmux kill-server


bind-key c: new-window
bind-key p: previous-window
bind-key n: next-window

Start the Discussion!Leave a Reply