install zsh

安装zsh

apt install zsh -y

查看系统中自带的shell
cat /etc/shells

切换shell

chsh -s /bin/zsh

安装 oh-my-zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
bash ./install.sh

配置 oh-my-zsh

  • 设置主题

参考主题

vim ~/.zshrc
# 编辑ZSH_THEME配置
ZSH_THEME="agnoster"
# 重启zsh,使配置生效
source ~/.zshrc
  • 设置自动补全
# 安装自动补全
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

vim ~/.zshrc
# 添加自动补全配置
plugins=(zsh-autosuggestions)
# 重启,使配置生效
source ~/.zshrc
  • 高亮
# 安装高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

vim ~/.zshrc
# 添加高亮配置
plugins=(zsh-syntax-highlighting)
# 重启,使配置生效
source ~/.zshrc
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值