Tmux
INFO
tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing remote sessions to remain active without being visible
Install
Debian :
➜ sudo apt install tmux
RedHat :
➜ sudo dnf install tmux
Arch
➜ sudo pacman -Sy tmux
Suse
➜ sudo zypper install tmux
USE
Create New Session
➜ tmux
Create New Session with name "koosha"
➜ tmux new -s koosha
List of sessions
➜ tmux ls
or
➜ tmux list-sessions
Attach
➜ tmux attach -t KYGnus
delete all sessions
➜ tmux kill-session -a
( except from latest)
Kill all Sessions
Note : You can type exit "within a session" to destroy the session
➜ exit
➜ tmux kill-session
Delete Specific Sessions
➜ tmux kill-session -t koosha
Rename Session
➜ tmux rename-session KYGnus
Re-attaching to Tmux Session
➜ tmux ls
➜ tmux attach-session -t 0
Detaching from Tmux Session
Ctrl+b d
Prefix
Ctrl+b c Create a new window (with shell) Ctrl+b w Choose window from a list Ctrl+b 0 Switch to window 0 (by number ) Ctrl+b , Rename the current window Ctrl+b % Split current pane horizontally into two panes Ctrl+b " Split current pane vertically into two panes Ctrl+b o Go to the next pane Ctrl+b ; Toggle between the current and previous pane Ctrl+b x Close the current pane Ctrl+b t time
Move around Panes
Ctrl+b Up Ctrl+b Down Ctrl+b Right Ctrl+b Left
Config
➜ vi ~/.tmux.conf
Last updated