- 安装 ncurses-devel
yum -y install ncurses-devel
- 安装 libevent-dev
yum -y install libevent-devel
- 安装tmux
如果系统已经安装有git,则可以直接从github上clone tmux的源码进行安装,具体操作步骤如下
3.1. 获取tmux 的源码
git clone https://github.com/tmux/tmux.git
3.2. 进入目录
cd tmux
3.3. 执行
sh autogen.sh
执行过程中可能会报中不到 aclocal 命令的错误,此时可安装 automake 后再执行 autogen.sh
yum install -y automake
3.4. 编译并安装tmux
./configure && make
- 简单使用
tmux new -s sessionName 创建 tmux会话
tmux ls 列出所有tmux 已有的会话
tmux a -t sessionName 打开指定会话
tmux命令前缀快捷键 ctrl+b (可根据需要改为其他的快捷键,我的mac改为了ctr+x); 前缀+d; 退出当前会话
命令前缀 + ", 横向分屏; 命令前缀+% 纵向分屏
linux centos 7 安装tmux
最新推荐文章于 2025-03-31 12:53:46 发布