redhat7.9安装zsh以及常用插件

1 安装zsh并更改默认终端

#1.安装软件包
yum -y install zsh git

#2.更改默认终端
chsh -s /bin/zsh

然后再退出下终端,重新登录用echo $SHELL  查看环境是否是/bin/zsh

2 配置oh-my-zsh

#1.从git仓库中拉取oh-my-zsh
git clone https://gitee.com/mirrors/oh-my-zsh.git ~/.oh-my-zsh

#2.生成配置文件
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

3 安装高亮、自动补全插件

#1.安装高亮插件:zsh-syntax-highlighting
git clone https://gitee.com/dawnwords/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

#2.安装自动补全:zsh-autosuggestions
git clone https://gitee.com/lhaisu/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions


#3.安装autojump目录跳转
git clone https://gitee.com/gentlecp/autojump.git
cd autojump
./install.py

4 插件配置

#配置文件中修改了2个地方
#第一个是主题ZSH_THEME="maran"
#第二个是plugins=( )

root@localhost.localdomain:/root # cat ~/.zshrc|grep -v "^#"|grep -v "^$"
export ZSH=$HOME/.oh-my-zsh
ZSH_THEME="maran"
plugins=(
        git
        sudo
        zsh-autosuggestions
        zsh-syntax-highlighting
        autojump
)
source $ZSH/oh-my-zsh.sh

5.效果展示

补充:还有个有趣的插件pokemonsay

#1.安装cowsay
yum install -y epel-release
yum install -y  cowsay

#2.安装pokemonsay
$ git clone http://github.com/possatti/pokemonsay
$ cd pokemonsay
$ ./install.sh

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值