Tmux Basics
Tmux Basics
- Referenced from: WoodenRobot
Installation
Arch:
sudo pacman -S tmux
Ubuntu:
sudo apt-get install tmux
MacOS:
brew install tmux
Tmux Basic Elements
- Session: Create a tmux workspace session
- Window: Contain multiple panes
- Pane: A window can be splited into multiple panes
Basic Commands
- Check all Sessions:
tmux ls
- Create New Session:
tmux new -s session-name
- Create New Session without specific name(not recommended):
tmux new
- Disconnect from current session:
tmux detach
orctrl + b + d
- Reconnect the first session on the list:
tmux a
- Reconnect a specific session:
tmux a -t session-name
- Close current Window:
exit
- Shut down a session(and all programs in it):
tmux kill-session -t session-name
orctrl + d
to close everything
Shortcut Keys
- Use
ctrl + b
as shortcut prefix: pressctrl b
first, then press other keys - Help:
?
- Display current time in current pane:
t
- Session Mgmt
- List all sessions:
s
- Rename current session:
$
- Disconnect current session:
d
- List all sessions:
- Window Mgmt
- Create a new window:
c
- Rename current window:
,
- List all windows:
w
- Horizontal Split:
%
- Vertical Split:
"
- Select Next Window:
n
- Select Previous Window:
p
- Select No. 0-9 Window:
0-9
- Create a new window:
- Pane Mgmt
- Create horizontal pane:
%
- Create vertical pane:
"
- Check the index of current pane:
q
- Switch between panes:
o
- Switch the position with next pane:
}
- Switch the position with previous pane:
{
- Display current pane in the new window:
!
- Close current pane:
x
- Scroll through current Pane:
[
- Create horizontal pane:
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment
TwikooLivere