Difference between revisions of "Linux: tmux"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) |
Rafahsolis (talk | contribs) m (→List/Attatch) Tag: visualeditor |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
| − | = tmux CheatSheet = | + | =tmux CheatSheet= |
| − | == Start tmux == | + | ==Start tmux== |
tmux | tmux | ||
| − | == Split Horizontal == | + | tmux new -s foo -d |
| + | |||
| + | ==Rename already started tmux== | ||
| + | <syntaxhighlight lang="text"> | ||
| + | [CTRL + B] + $ | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | ==List/Attatch== | ||
| + | <source lang="text">tmux ls | ||
| + | tmux attach | ||
| + | tmux attach -t foo</source> | ||
| + | |||
| + | ==Split Horizontal== | ||
[CTRL] + b + % | [CTRL] + b + % | ||
| − | == Panels ([CTRL + B] + | + | ==Panels ([CTRL + B] +== |
<nowiki>% vertical split | <nowiki>% vertical split | ||
| − | " horizontal split | + | " horizontal split |
| − | o swap panes | + | o swap panes |
| − | q show pane numbers | + | q show pane numbers |
| − | x kill pane | + | x kill pane |
| − | + break pane into window (e.g. to select text by mouse to copy) | + | + break pane into window (e.g. to select text by mouse to copy) |
| − | - restore pane from window | + | - restore pane from window |
| − | ⍽ space - toggle between layouts | + | ⍽ space - toggle between layouts |
| − | <prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane) | + | <prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane) |
| − | <prefix> { (Move the current pane left) | + | <prefix> { (Move the current pane left) |
| − | <prefix> } (Move the current pane right) | + | <prefix> } (Move the current pane right) |
| − | <prefix> z toggle pane zoom | + | <prefix> z toggle pane zoom |
| − | [ Scroll (press q to quit) | + | [ Scroll (press q to quit) |
| − | Arrows to change panel | + | Arrows to change panel |
| − | Exc + Arrow Resize panel</nowiki> | + | Exc + Arrow Resize panel</nowiki> |
| − | == Window == | + | ==Window== |
| − | === Deattach === | + | ===Deattach=== |
[CTRL] + b + d | [CTRL] + b + d | ||
| − | === List === | + | ===List=== |
tmux ls | tmux ls | ||
| − | === Reattach === | + | ===Reattach=== |
tmux -a -t [Name or number] | tmux -a -t [Name or number] | ||
| − | == Kill == | + | ==Kill== |
& kill window | & kill window | ||
| − | == Change tmux commnad prefix key combination == | + | ==Change tmux commnad prefix key combination== |
At ~/.tmux.conf: | At ~/.tmux.conf: | ||
<nowiki># remap prefix to Control + a | <nowiki># remap prefix to Control + a | ||
| − | set -g prefix C-a | + | set -g prefix C-a |
| − | # bind 'C-a C-a' to type 'C-a' | + | # bind 'C-a C-a' to type 'C-a' |
| − | bind C-a send-prefix | + | bind C-a send-prefix |
| − | unbind C-b</nowiki> | + | unbind C-b</nowiki> |
| − | == Online Cheatsheets == | + | ==Online Cheatsheets== |
https://gist.github.com/MohamedAlaa/2961058<br /> | https://gist.github.com/MohamedAlaa/2961058<br /> | ||
https://gist.github.com/andreyvit/2921703 | https://gist.github.com/andreyvit/2921703 | ||
Latest revision as of 11:41, 19 March 2019
tmux CheatSheet[edit]
Start tmux[edit]
tmux tmux new -s foo -d
Rename already started tmux[edit]
[CTRL + B] + $
List/Attatch[edit]
tmux ls
tmux attach
tmux attach -t foo
Split Horizontal[edit]
[CTRL] + b + %
Panels ([CTRL + B] +[edit]
% vertical split
" horizontal split
o swap panes
q show pane numbers
x kill pane
+ break pane into window (e.g. to select text by mouse to copy)
- restore pane from window
⍽ space - toggle between layouts
<prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane)
<prefix> { (Move the current pane left)
<prefix> } (Move the current pane right)
<prefix> z toggle pane zoom
[ Scroll (press q to quit)
Arrows to change panel
Exc + Arrow Resize panel
Window[edit]
Deattach[edit]
[CTRL] + b + d
List[edit]
tmux ls
Reattach[edit]
tmux -a -t [Name or number]
Kill[edit]
& kill window
Change tmux commnad prefix key combination[edit]
At ~/.tmux.conf:
# remap prefix to Control + a set -g prefix C-a # bind 'C-a C-a' to type 'C-a' bind C-a send-prefix unbind C-b
Online Cheatsheets[edit]
https://gist.github.com/MohamedAlaa/2961058
https://gist.github.com/andreyvit/2921703