Centos安装TMUX工具
添加注册外部源地址信息
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
执行安装tmux
yum install tmux
用户根目录下创建tmux.conf文件,并添加如下内容
vi ~/.tmux.conf
# 修改默认触发执行命令的按键:CTRL+b为Ctrl+a set-option -g prefix C-a unbind-key C-b bind-key C-z send-prefix # 添加短命名执行分屏执行命令 bind s setw synchronize-panes #设置屏幕支持颜色集 set -g default-terminal "screen-256color" #默认显示字符集 set-window-option -g utf8 on # 设置状态栏的颜色 set -g status-fg black set -g status-bg white # 设置窗口列表的颜色 setw -g window-status-fg black setw -g window-status-bg default #setw -g window-status-attr dim # 设置活动窗口的颜色 setw -g window-status-current-fg white setw -g window-status-current-bg red setw -g window-status-current-attr bright # 设置当前窗口分割的边框颜色 set -g pane-active-border-fg colour46 #set -g pane-active-border-fg white #set -g pane-active-border-bg colour69 #set -g pane-active-border-bg colour208 #重定义横向分屏指令 unbind '"' bind - splitw -v #重定义纵向分屏指令 unbind '%' bind | splitw -h
注意改变颜色需要设置shell用户的默认TERM
export TERM=xterm-256color
扫描二维码关注公众号,回复:
239451 查看本文章
在 /etc/profile 加一行
alias t="tmux"
以后就用 t new 来代表 tmux new
alias t="tmux"
以后就用 t new 来代表 tmux new