Usage of a terminal multiplexer tmux vs screen
terminal multiplexer
Whenever you connect to a machine I highly recommend the usage of a terminal multiplexer.
the most common are tmux, screen.
screen uses ctrl+a for command tmux uses ctrl+b for command
tmux vs. screen commands
from TIL/tmux/tmux_vs_screen-commands-v2.md at master · P7h/TIL · GitHub
| Action | tmux | screen |
|---|---|---|
| start a new session | tmux tmux new tmux new-session |
screen |
| start a new session with a name | tmux new -s name | screen -S name |
| re-attach a detached session | tmux attach tmux attach-session |
screen -r |
| re-attach a detached session with a name | tmux attach -t name tmux a -t name |
screen -r name |
| re-attach an attached session (detaching it from elsewhere) | tmux attach -d tmux attach-session -d |
screen -dr |
| re-attach an attached session (keeping it attached elsewhere) | tmux attach tmux attach-session |
screen -x |
| detach from currently attached session | ^b d ^b :detach |
^a d |
| rename-window to newname | ^b , ^b :rename-window |
^a A newname |
| list windows | ^b w | ^a w |
| list windows in chooseable menu | ^a " | |
| go to window # | ^b # | ^a # |
| go to last-active window | ^b l | ^a l |
| go to next window | ^b n | ^a n |
| go to previous window | ^b p | ^a p |
| see keybindings | ^b ? | ^a ? |
| list sessions | ^b s tmux ls tmux list-sessions |
screen -ls |
| toggle visual bell | ^a ^g | |
| kill the current pane | ^b x logout ^D |
^a X |
| destroy the current window | ^b & | ^a k ^a ^k |
| exit current shell | ^d | ^d |
| create another window | ^b c | ^a c |
| switch to another pane | ^b o | ^a Tab |
| split pane horizontally | ^b " | ^a S then ^a Tab and ^a c |
| split pane vertically | ^b % | ^a | then ^a Tab and ^a c |
| close other panes except the current one | ^b ! | |
| swap location of panes | ^b ^o | |
| re-arrange current panes within same window (different layouts) | ^a space | |
| show time | ^b t | |
| show numeric values of panes | ^b q | |
| enable scroll / view scrollback | ^b [ (and to exit q) |
^a [ (and to exit q) |
| copy text in one view | ^a [ ^m (highlight text and enter) (to save: ^a >) |
|
| paste text into a view | ^a ] |
Comments
Display comments as Linear | Threaded