- PDF Link: cheatsheet-tmux-A4.pdf, Category: tools
- Blog URL: https://cheatsheet.dennyzhang.com/cheatsheet-tmux-A4
- Related posts: Cheatsheet: ssh, #denny-cheatsheets
File me Issues or star this repo.
Name | Comment |
---|---|
Create new session | tmux new -s denny |
List all sessions | tmux ls |
Attach to one session | tmux attach -t denny |
Detach session | C-b d |
Kill one session | tmux kill-session -t denny |
List all shortcut keys | C-b :list-keys , C-b ? Very useful! |
Kill current window | C-b & |
Default conf file | ~/.tmux.conf , ~/.tmate.conf |
Name | Comment |
---|---|
Switch to next pane | C-b o |
Vertically split pane | C-b % |
Horizontally split pane | C-b " |
Kill current pane | C-b x |
Swap two panes | C-b C-o |
Resize current pane right | C-b :resize-pane -R 20 |
Resize current pane down | C-b :resize-pane -D 10 |
Name | Comment |
---|---|
Enter copy mode | C-b [ , press q/Esc to exit |
Search output | C-b C-s , C-b C-u |
Paste buffer to current panel | C-b ] |
Page up/down | Enter copy mode, then use normal navigation keys |
Page up/down in Mac | Fn + Up Arrow |
Show things in current buffer | tmux show-buffer |
List all buffer | tmux list-buffers |
Save buffer to file | tmux save-buffer foo.txt |
Name | Comment |
---|---|
see tmate log messages: ssh conn string | tmate show-messages |
Launch tmate in a detached state | tmate -S /tmp/tmate.sock new-session -d |
Blocks until the SSH connection is established | tmate -S /tmp/tmate.sock wait tmate-ready |
Prints tmate SSH connection string | tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}' |
Make your tmate session big by default | Make your default iterm window big |
https://gist.github.com/MohamedAlaa/2961058
https://wiki.freebsdchina.org/software/t/tmux
https://robots.thoughtbot.com/a-tmux-crash-course
https://gist.github.com/Bekbolatov/6840069e51382965fdad
License: Code is licensed under MIT License.