Tmux - Kuangcp/Note GitHub Wiki
目录 start
目录 end|2020-11-17 14:17|
基本操作
-
新建会话
tmux new -s myth
-
连接会话
tmux a -t test
-
显示所有
tmux ls
-
重新加载配置文件
tmux source ~/.tmux.conf
-
prefix
- ? 帮助
- s 选择 session
- w 选择 window
- d deattach 脱离
- j 下 panel
- k 上 panel
- ; 最近的 panel
Tmux配置文件
步骤:
ln -s $(pwd)/tmux.conf ~/.tmux.conf
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux source ~/.tmux.conf
-
Ctrl A, I
等待插件安装完成
开启鼠标选择与复制
set -g mouse on
按住Shift即可照常使用鼠标选中文本
Prefix 默认是 C-b 也就是 Ctrl b
- prefix w 切换 window 或者 Session
- Prefix () 切换 Session
-
Tmux Plugin Manager
查看Readme下载安装
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
-
Prefix I
安装新增的插件
prefix c-s 保存会话 prefix c-r 加载历史会话
使用: Prefix /
可用 less 一样的方式搜索
set-option -g default-command '/bin/bash'
追加到 tmux.conf 即可解决,如果使用 zsh 则是 /usr/bin/zsh