Gangmax Blog

tmux

From here, here, here and here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
sudo apt-get install tmux
# Create a tmux session.
tmux new -s work
# In the session, do whatever you want.
nohup pytube https://www.youtube.com/playlist?list=PLgKat64mmTvV7c4XSn6mw4x2a5ePxcPZM &
# The host key
# Detach from the session.
tmux detach
# List session(s).
tmux ls
tmux list-session
# Attach the existing session.
tmux attach -t work
tmux attach -t 0
# Kill the existing session if you want.
tmux kill-session -t work
tmux kill-session -t 0
# Swith session.
tmux switch -t <session-name>
tmux switch -t 0
# Rename session.
tmux rename-session -t 0 <new-name>

The default prefix key is “C-b”, which means the “Ctrl key” and “b”. In tmux, modifier keys are shown by prefixing a key with “C-“” for the control key, “M-“ for the meta key (normally Alt on modern computers) and “S-“ for the shift key. These may be combined together, so “C-M-x” means pressing the control key, meta key and “x” together. Use “C-b ?” to show the help keys information.

1
2
3
Ctrl+b d:detach the current session.
Ctrl+b s:list all sessions.
Ctrl+b $:Rename the current session.

More “pane” and “window” related operations, please check the post here.

Comments