Tmux is a terminal that I often use. Great benefits are if ssh disconnects the terminal remains and if I run some command, it continues to run. Other benefit is same screen for two or more ssh connections.
These are more common basic command to use in tmux
Start a new session with a specific name
tmux new -s session-5
By default , after entering the command “tmux”, sessions are named with a number
[email protected]:~$ tmux ls 0: 2 windows (created Sun Oct 11 13:10:12 2020) (attached) session-5: 1 windows (created Tue Oct 13 11:26:48 2020) [email protected]:~$
There are two sessions in this computer, named 0 and session-5.
Connect to specific session
tmux attach -t session-5
C^ to specify CONTROL and
M^ to specify ALT button. The control character for tmux is
C^b. After this combination is pressed user enters control mode and perform actions like copy and paste, split windows etc.
Split session vertically
Split session horizontally
The result of splitting first vertically then horizontally looks like the following:
Navigate between open windows
Open new window
Detach – exit from tmux, but leave the session running
To copy in tmux, first click
C^b [. With arrows go to desired text click
C^SPACE. Select desired text with arrows. Click
M^w. Text copied.
To paste go to desired location to paste , click