一. 什么是oh my zsh?
oh my zsh 是一个开源的zsh配置工具,正如它主页上说的,oh my zsh基于zsh命令行,提供了主题配置,插件机制,内置的便捷操作。让我们用一种全新的方式来使用命令行。
要使用oh my zsh,必须满足一些前提条件:
一个类似Unix的操作系统,如:macOS、Linux、BSD,在Windows操作系统上,最好是WSL2;
已安装zsh(v4.3.9版本或更高版本)
已安装curl和wget
已安装git(推荐v2.4.11或更高版本)
二. 怎么检查oh my zsh必须的前提条件?
检查zsh是否已安装
# 检查zsh版本,确定是否已安装zsh
zsh --version
# 若未安装,请按照提示安装zsh
sudo apt install zsh
检查curl是否已安装
# 检查curl版本,确定是否已安装curl,若未安装请自行安装
curl --version
检查wget是否已安装
# 检查wget版本,确定是否已安装wget,若未安装请自行安装
wget --version
检查git是否已安装
# 检查git版本,确定是否已安装git,若未安装请自行安装
git --version
三. 怎么安装oh my zsh?
curl安装
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
wget安装
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
手动安装