安装所需要软件包
yum install -y zsh git
切换使用zsh
查 zsh位置
which zsh
一般位置/usr/bin/zsh
chsh -s /usr/bin/zsh
假如遇到如下报错:
[root@stream8]~# chsh -s /usr/bin/zsh
zsh: command not found: chsh
安装以下软件包可以解决。
yum install -y util-linux-user
这样就可以解决了。
[root@stream8]~# chsh -s /usr/bin/zsh
正在更改 root 的 shell。
shell 已更改。
安装oh my zsh
默认的是从官网安装会比较慢,我写了个脚本用于国内加速安装。
sh -c "$(curl -fsSL https://gitee.com/lxyoucan/tools/raw/master/common/ohmyzsh_itkey.sh)"
这样就可以完成oh my zsh 的安装工作了。