zsh+ohmyzsh配置

0x01 安装ZSH

sudo apt update
sudo apt install zsh -y

验证安装是否成功

zsh --version

0x02 安装 ohmyzsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

0x03 设置zsh为默认shell

chsh -s $(which zsh)

然后直接重启系统

sudo reboot

0x04 配置zsh插件

修改主题为:alanpeabody
执行如下命令安装插件

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

打开 ~/.zshrc,找到plugins=(git) 修改为 plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

posted @ 2025-12-17 14:23  Taolaw  阅读(5)  评论(0)    收藏  举报