Linux终极终端terminator+zsh安装与配置

终极终端terminator+zsh安装与配置

  1. 使用软件管理器安装:
操作系统安装脚本
ubuntusudo apt install zsh
centos7sudo yun install zsh
centos8sudo dnf install zsh
  1. 查看/etc/shells确认包含/bin/zsh:cat /etc/shells
  2. 修改默认shell:chsh -s /bin/zsh
  3. 安装oh-my-zsh:
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

如果在zsh之前先安装了conda,可以使用conda init zsh将其激活脚本优雅地添加到.zshrc中,不需要像很多教程里手动添加export PATH脚本。

如果克隆不了git库,可以使用代理加速站,比如https://ghproxy.futils.com

  1. 安装插件
git clone git://github.com/joelthelion/autojump.git && cd autojump && ./install.py
git clone git://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone git://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  1. 修改~/.zshrc的以下内容:
ZSH_THEME="crunch"#个人PC推荐crunch,服务器推荐gentoo
plugins=(git autojump zsh-syntax-highlighting zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh

alias .=source
# some more ls aliases
alias ll='ls -halF'
alias la='ls -A'
alias l='ls -CF'

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

# Do not explain * by zsh
setopt no_nomatch

# Note the source command must be at the end of ~/.zshrc.
# 注意:下面一行脚本必须放在~/.zshrc文件的最后一行才能正确生效
source $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值