安装zsh和oh-my-zsh

查看可用的shell

1
cat /etc/shells

centos 安装zsh

1
yum install -y zsh

安装on-my-zsh

1
2
3
4
5
6
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

#如果github无法访问,可使用以下地址
#git clone https://github.com.cnpmjs.org/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

切换默认shell

1
chsh -s /bin/zsh

编辑zshrc文件,修改主题,添加alias和配置插件

1
2
vim ~/.zshrc
(推荐主题ZSH_THEME="jtriley"

应用zshrc文件

1
source ~/.zshrc

安装zsh和oh-my-zsh
https://lejtao.online/2021/10/08/安装zsh和oh-my-zsh/
作者
LeJTao
发布于
2021年10月9日
许可协议