Tips & Tricks

Tmux Cheatsheet for Splitting Terminal Panes and More

Note: <PrefixKey> by default is Ctrl + B

Creating Tmux Sessions and Windows

tmux new -s ExampleCreate a new tmux session titled “Example”
<PrefixKey> + CCreate a new window within the session
<PrefixKey> + NumberTake you to your different windows. Windows are identified by the banner down below.
<PrefixKey> + ,Rename the current Window. 
<PrefixKey> + DDetach your tmux session from the terminal window.
tmux attach-session -t ExampleReattach to a session titled “Example”

Window Splitting

<PrefixKey> + %Vertical Split
<PrefixKey> + "Horizontal Split
<PrefixKey> + <ArrowKey>Move around between your panes
<PrefixKey> + ZZoom in and fill out pane you’ve got selected. Do it a 2nd time to zoom out.
<PrefixKey> + Hold Ctrl + <ArrowKey>Resizes the pane
<PrefixKey> + {Move pane to the left
<PrefixKey> + }Move pane to the right
<PrefixKey> + <SPACE>Toggle shuffling the panes

Helpful Command Line Tricks

Ctrl + AGo to beginning of line
Ctrl + E Go to end of line 
Ctrl + <ArrowKey>Move word by word in the line
Alt + .This will autofill the last word you used from this position in the previous command.
Ctrl + RRecursively search through your command history. 

Navigating the Terminal

<PrefixKey> + [Enter Edit Mode.
While in Edit Mode:
This will exit edit mode.
While in Edit Mode:
Ctrl + <ArrowKey>
This will allow you to scroll.
While in Edit Mode:
Move around the terminal window.

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