Cheatography
https://cheatography.com
Are you a command line user? Do you long-running jobs via the terminal you don't want to close even if you accidentally lose your connection? If so, tmux is for you!
General controlsDefault bind-key | ^b (ctrl+b) | Enter a tmux command prompt | ^b : |
SessionsStart a new session | tmux | Attach to default session | tmux a | List existing sessions | tmux ls | Rename current session | ^b $ | Detach current client | ^b d | Detach other clients | ^b D |
Windows (tabs)Create a new window | ^b c | Next window | ^b n | Previous window | ^b p | Select a window interactively | ^b w | Rename the current window | ^b , | Kill the current window | ^b & |
In the status bar (bottom) are the number/name of windows.
| | Panes (vertical/horizontal splits)Split current pane vertically | ^b % | Split current pane horizontally | ^b " | Navigate around panes | ^b <arrow keys> | Resize the current pane | ^b ^<arrow keys> | Swap pane location | ^b ^o | Send the current pane to a new window | ^b ! | Toggle zoom current pane | ^b z | Arrange panes in a tiled layout | ^b alt+5 | Arrange to a next preset layout | ^b <space> | Kill current pane | ^b x |
There are many other key-bindings for resizing panes that are worth learning, but out of scope for a basic cheatsheet.
Tmux command promptToggle broadcast to all panes | setw synchronize-panes |
To enter a tmux command prompt press ^b :
Config file for customization# Shortcut to 'synchronize panes' with '^b ='
bind = set -g synchronize-panes
# Enable mouse support
set -g mouse on
# Set panel border 'red' to active window
#set -g pane-active-border-style bg=red
# Set background 'red' to active window
#set -g window-active-style bg=red
|
Put this config in ~/.tmux.conf file.
|
Created By
https://linktr.ee/cfgnunes
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets