TMUX notes

TMUX is very useful for me to switch between multiple sessions on a node. TMUX is also good for creating a persistent session that we can reattach to when we reconnect later.

Ctrl + b c is creating a session 1

Ctrl + b 0/1 switching between session 0 and session 1

Ctrl + b + % split a pane vertically

Ctrl + b + “ split a pane horizontally

Ctrl + b +  direction to move between different panes

Ctrl d exit the current session or a single pane

Ctrl + b + [ to enter copy mode, where you scroll up and down to see text outside of your current screen.

Ctrl + b + ] for paste

tmux attach

tmux ls (sees all existing tmux sessions)

Ctrl + b + D (detach without exiting the session)

Ctrl + D (exit the session)

By default, each TMUX session is given a number as name, such as 0,1. As a result, when you try to attach to a specific tmux session, do

tmux attach -t 0/1/2

But you can also give it a custom name

tmux new -s myname

Split Panes on Emacs is also incredibly useful
%  vertical split
"  horizontal split

o  swap panes
q  show pane numbers
x  kill pane
+  break pane into window (e.g. to select text by mouse to copy)
-  restore pane from window
⍽  space - toggle between layouts

Good posts on TMUX


This entry was posted in Tools and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s