Ubuntu快速安装Oh my zsh 2021-6-26

查看当前已安装的shell

cat /etc/shells

更新软件包,确保安装了wget

apt-get update
apt-get upgrade
apt-get install -y wget
apt-get install -y vim

使用wget获取快捷安装脚本,脚本从oh my zsh官网获得,
笔者将其源改成了gitee,加快访问和下载速度

wget https://gitee.com/heyuanfly/ohmyzsh/raw/master/ubuntu-install-oh-my-zsh.sh

获得安装脚本后,改变其权限,使其可以执行,然后直接执行即可

chmod +x ubuntu-install-oh-my-zsh.sh
./ubuntu-install-oh-my-zsh.sh

此时,oh my zsh 已经安装成功,下面改变主题(可选)
笔者改成ys主题,感觉不错,agnoster 也不错
改成random也可,其会随机的选择主题

vim ~/.zshrc

找到 ZSH_THEME="robbyrussell" 改为 ZSH_THEME="ys"

:wq #保存退出
source .zshrc #刷新文件,使其生效
zsh #重新进入zsh,即可看到效果

改变默认shell为zsh

chsh -s /bin/zsh

安装智能高亮自动补全插件,执行以下命令

git clone https://gitee.com/heyuanfly/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://gitee.com/heyuanfly/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
vim ~/.zshrc

找到plugins=(git),将其改为

plugins=(git zsh-syntax-highlighting zsh-autosuggestions)

然后保存退出,刷新,重新进入zsh即可

:wq
source .zshrc
zsh
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值