0. Install tmux
sudo apt-egt install tmux
[tmux sessions]
1. New sessions Create a new session
tmux
tmux new
tmux new-session
tmux new -s YourSessionName (-s就是session的首字母)
2. Attach sessions to open the session
tmux a
tmux attach
tmux attach-session
tmux a -t YourSessionName
3. Dettach sessions close the session
exit
4. Check sessions view sessions
Outside the session environment:
tmux ls
In the session environment, first press ctrl and b at the same time, and then press s alone:
ctrl + b s
5. Rename sessions Rename session
Outside the session environment:
tmux rename -t old_session_name new_session_name
Inside the session environment:
ctrl + b $
6. Remove sessions delete sessions
tmux kill-ses
tmux kill-session -t YourSessionName
[tmux windows]
1. Create window Create a new window
ctrl + bc
2. Move to n ext window Switch to the next window
ctrl + bn
3. Move to p previous window Switch to the previous window
ctrl + bp
[tmux panels]
1. Vertical split Vertical split panel
ctrl + b%
2. Horizontal split horizontal division panel
ctrl + b"(a double quote)
3. Move to the right panel (cursor) to move to the right panel
ctrl + b→
4. Move to the left panel (cursor) to move to the left panel
ctrl + b←
5. Move to the up panel (cursor) moves to the upper panel
ctrl + b↑
6. Move to the down panel (cursor) moves to the lower panel
ctrl + b↓
7. Kill panel delete panel
ctrl + bx
8. Page turning (supplement)
ctrl + b[Then you can slide the mouse wheel to turn the page