Difference between revisions of "Tmux terminal multiplexer"
From Free Knowledge Base- The DUCK Project: information for everyone
m |
m |
||
Line 25: | Line 25: | ||
bind-key R source-file ~/.tmux.conf \; \ | bind-key R source-file ~/.tmux.conf \; \ | ||
− | + | display-message "source-file done" | |
Or from sh(1): | Or from sh(1): | ||
Line 34: | Line 34: | ||
tmux new-session -d 'vi /etc/passwd' \; split-window -d \; attach | tmux new-session -d 'vi /etc/passwd' \; split-window -d \; attach | ||
+ | |||
+ | |||
+ | [[Category:Computer_Technology]] | ||
+ | [[Category:Linux]] |
Latest revision as of 22:19, 24 February 2018
tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.
tmux may be detached from a screen and continue running in the background, then later reattached.
- ssh into the remote machine
- start tmux by typing tmux into the shell
- start the process you want inside the started tmux session
- leave/detach the tmux session by typing Ctrl+b and then d
The tmux and GNU screen utilities have many similarities. tmux is considered more modern.
Each session is persistent and will survive accidental disconnection (such as ssh(1) connection timeout) or intentional detaching (with the ‘C-b d’ key strokes). tmux may be reattached using:
tmux attach
Example tmux commands include:
refresh-client -t/dev/ttyp2 rename-session -tfirst newname set-window-option -t:0 monitor-activity on new-window ; split-window -d bind-key R source-file ~/.tmux.conf \; \ display-message "source-file done"
Or from sh(1):
tmux kill-window -t :1 tmux new-window \; split-window -d tmux new-session -d 'vi /etc/passwd' \; split-window -d \; attach