Quick guide to tmux

I resisted tmux for a long time until today because screen has everything I need and I was afraid of having to remember more key strokes and commands. I gave tmux a try today and I think I am going to like it.

Start new tmux session
tmux new

Exit session. This will end the session

Detach from the session. The session will keep running
^b d

Hit ^b, release and then hit d)

List existing tmux sessions
tmux ls

Attach a session
tmux attach-session -t
tmux a -t

Attached the last created session
tmux a #

Start a new tmux session with your name of choice
tmux new -s SessionName

Attach a session using name
tmux a -t SessionName

Create a new window
^b c

Rotate between windows
^b 0
^b 1

.. and so on. tmux ls show the number of windows.

Kill current window
^b x

Split pane vertically
^b %

Split plan horizontally
^b “

Moving around pane

Resize pane up,down, left, right by two lines
^b :
resize-pane -U 2
resize-pane -D 2
resize-pane -L2
resize-pane -R 2

To exit a pane

^b [
Then use the arrow keys and other keys you normally use for scrolling. Hit Q to quit.


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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