Ubuntu安装Zsh
2025/7/17小于 1 分钟
安装Zsh
sudo apt install zsh
切换至Zsh
chsh -s /bin/zsh
重启一下终端
之后可能出现如下配置页面

根据自己的需求选择即可,不是很重要,后续会重新配置
安装oh-my-zsh主题
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
安装完应该会出现如下页面

安装插件
自动补全
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
语法高亮
git clone https://gitee.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
启用插件
nano ~/.zshrc
修改如下内容

source ~/.zshrc
美化(可选)
安装powerlevel10k
安装
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
使用

定制化
根据提示定制自己喜欢的风格

重新配置
p10k configure