Tmux简明手册

screen类似,tmux也用来管理多个终端回话。常用的就是下面几个命令:

(1)创建新会话:

# tmux

创建时指定会话的名字(2是会话名字),多用于复用之前已经退出会话的名字:

# tmux new -s 2  

(2)离开(detach)会话:先输入Ctrl + b,然后输入d
(3)列出当前管理的所有会话(冒号前面的是会话名字):

# tmux ls
0: 1 windows (created Wed Jul  3 15:08:44 2019) [88x29]
1: 1 windows (created Wed Jul  3 16:29:19 2019) [120x39]

(4)附着(attach)某个会话(2是会话名字):

# tmux a -t 2

(5)杀死某个会话(2是会话名字):

# tmux kill-session -t 2

参考资料:
A Gentle Introduction to tmux
tmux cheatsheet

发表评论

邮箱地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.