# List all tmux sessions
tmux ls
# Attach to mysession
tmux a -t mysession
# Create/attach to named session
tmux new-session -A -s wip
# Multiple sessions for different contexts
tmux new-session -A -s wip # Wip coordination
tmux new-session -A -s dev # Development work
tmux new-session -A -s ops # Ops/monitoring
| Key | Action | |
|---|---|---|
Ctrl+B d |
Detach (session keeps running) | , |
Ctrl+B w |
Window list of all sessions | |
Ctrl+B & |
kill current window | |
Ctrl+B c |
New window | |
Ctrl+B n |
Next window | |
Ctrl+B p |
Previous window | |
Ctrl+B " |
Split horizontal | |
Ctrl+B % |
Split vertical | |
Ctrl+B [ |
Scroll mode (q to exit) |
# From any device (phone, laptop, tablet):
ssh nsadmin@10.147.17.176 -t "tmux attach -t wip"
# If session doesn't exist, create it:
ssh nsadmin@10.147.17.176 -t "tmux new-session -A -s wip"
Ah, the triple-layer nesting! Because you are on a Mac, remoted into Windows, and SSH’ing into Linux, macOS is intercepting the Ctrl + Arrow Key combination first because it is a global Mac shortcut used for “Mission Control” (switching virtual desktops). To fix this, you have two options: either bypass the arrow keys entirely using standard tmux command lines, or use a specific tmux shortcut that changes layout sizes instantly.
Solution 1: Use the Command Line (No Arrow Keys)
This bypasses macOS completely by using text commands.
Solution 2: Use Built-in Presets
If you just want tmux to instantly balance your screen out evenly without fighting your keyboard layout, you can use these default layout keys:
Solution 3: Disable the Mac Shortcut (Optional)
If you want your normal terminal arrow shortcuts to work, you can turn off the macOS shortcut that is getting in the way:
You can resize panes in tmux using either keyboard shortcuts or your mouse.
Method 1: The Standard Keyboard Shortcuts
To resize, you press your prefix key (Ctrl + b), release it, and then hold down the Ctrl key while tapping the arrow keys.
Method 2: Temporary Full-Screen (Zoom)
If you just need a pane to be bigger temporarily to read a lot of text, you can “zoom” it to fill the entire window, and then shrink it back down when you are done.
Method 3: Enable the Mouse (Highly Recommended)
If you want to simply click and drag the borders of your panes with your mouse, you can turn on mouse mode.