Ubuntu安装oh my tmux(配置tmux和.tmux)

本文介绍了如何安装tmux及其增强版ohmytmux,包括源码编译安装步骤和配置文件个性化设置。同时讲解了如何安装和使用tmux插件管理工具tpm,以及推荐了一些常用的tmux插件,如tmux-resurrect和tmux-continuum,以提升tmux的使用体验。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装oh my tmux

官方github地址: .tmux

安装教程已上传到gitee:安装.tmux

预准备

安装终端复用器tmux
  • 二进制包安装
    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-XdLKvhLs-1640787626994)(images/tmux二进制包安装.png)]

  • 源码编译安装

    注:源码安装过程如果如果缺少相应的依赖包,可先安装依赖软件,再编译安装tmux

    git clone https://github.com/tmux/tmux.git
    cd tmux
    bash autogen.sh
    ./configure && make
    sudo make install
    
安装oh my zsh

安装.tmux

  • 下载源码
# git下载github方法,速度较慢,也可以拷贝到gitee再clone
git clone https://github.com/gpakosz/.tmux.git  /home/king/software-pkg/zq_ohmyzsh/oh-my-tmux
# 去github仓库下载源码压缩包pwd
/home/king/software-pkg/zq_ohmyzsh/oh-my-tmux

❯ ls
tmux-master.zip

# 解压
❯ unzip tmux-master.zip -d ./
❯ ls -a
.  ..  .tmux-master  tmux-master.zip

# 创建软链接ln -s -f ~/software-pkg/zq_ohmyzsh/oh-my-tmux/.tmux-master/.tmux.conf ~/.tmux.conf

# 用户可以通过修改配置文件~/.tmux.conf.local来个性化设置tmuxcp ~/software-pkg/zq_ohmyzsh/oh-my-tmux/.tmux-master/.tmux.conf.local ~/.tmux.conf.local

配置

  • 通过修改~/.tmux.conf.local文件,在文件尾部追加如下内容
vim ~/.tmux.conf.local

以上为本人目前的配置,欢迎补充,大佬们分享更多功能。

  • 修改完之后执行tmux source-file让配置文件立即生效
tmux source-file ~/.tmux.conf.local 

本人的配置文件已经上传到.tmux.conf.local

插件

各种插件的github地址:tmux插件

安装tmux插件管理工具tpm,本人于2021-12-26安装oh my tmux,官网已经提供了tpm的内键支持,所以不需要再额外安装了。

This configuration now comes with built-in TPM support。

  • 本人目前的插件
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'

set -g @continuum-save-interval '30'
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值