tmux使用

PhoenixGS
Jul 19, 2022
Last edited: 2022-7-25
type
Post
status
Published
date
Jul 19, 2022
slug
tmux
summary
终端下tmux的使用
tags
CS
命令行
category
icon
password
Property
Jul 25, 2022 02:53 PM
安装
# Ubuntu 或 Debian $ sudo apt install tmux # CentOS 或 Fedora $ sudo yum install tmux # Mac $ brew install tmux
启动
$ tmux
退出
Ctrl+d
或者
$ exit
新建会话
$ tmux new -s <session-name>
分离会话
Ctrl+b d
或者
$ tmux detach
查看所有会话
Ctrl+b s
或者
$ tmux ls # or $ tmux list-session
接入会话
# 使用会话编号 $ tmux attach -t 0 # 使用会话名称 $ tmux attach -t <session-name>
杀死会话
# 使用会话编号 $ tmux kill-session -t 0 # 使用会话名称 $ tmux kill-session -t <session-name>
切换会话
# 使用会话编号 $ tmux switch -t 0 # 使用会话名称 $ tmux switch -t <session-name>
重命名会话
$ tmux rename-session -t 0 <new-name>
重命名当前会话:Ctrl+b $
深度学习MPI学习小结