本文最后更新于 1 年前,文中所描述的信息可能已发生改变。
- 安装zsh
bash
sudo apt update
sudo apt upgrade
sudo apt install zsh
chsh -s /bin/zsh
bash
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
国内可能失败!
解决:
bash
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
chmod +x install.sh
./install.sh
- 安装主题Powerlevel10k
bash
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
编辑~/.zshrc
设置ZSH_THEME="powerlevel10k/powerlevel10k"
。
配置
bash
source ~/.zshrc
// 重新配置
p10k configure
插件安装
bashgit clone https://github.com/zsh-users/zsh-syntax-highlighting.git echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
bashgit clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
linux 环境还需要字体Nerd Font