Install tmux:
sudo apt install tmux
Copy the tmux.conf
file bellow to your home:
cp tmux.conf ~/.tmux.conf
To create a new session:
tmux
To attach to an existing session:
tmux a
- Tmux runs sessions to where we can attach clients.
- Each session can have many windows (listed on bottom)
- Each window can have many panes (the splitted panes)
- Each new pane is a new bash prompt/terminal
All commands start with C-b
(C is the command
key on Mac; ctrl
key on Linux):
C-b c Create a new window
C-b | Split window vertically
C-b - Split window horizontally
C-b <arrow keys> Move between panes
C-b <number> Go to window with number n (listed on bottom)
C-b [ Enter in "scroll mode". Use arrows and pg down/up to move on pane. Use Enter to exit the mode.
C-b d Dettach from session (to get back: tmux a)