Skip to content

zsh快速开始

安装

Arch

shell
sudo pacman -S zsh

Debian

shell
sudo apt install zsh

配置

安装Oh-My-Zsh

常规方法

shell
cd ~
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
sh ./install.sh

国内源安装(Gitee)

git clone https://gitee.com/mirrors/ohmyzsh.git
cd ./ohmyzsh/tools
vim ./install.sh

REMOTE=${REMOTE:-https://github.com/${REPO}.git}修改为REMOTE=${REMOTE:-https://gitee.com/mirrors/ohmyzsh.git}

sh ./install.sh

安装插件

常规方法

bash
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
#安装oh-my-zsh插件highlighting

vim ~/.zshrc
#在plugins=()中添加zsh-syntax-highlighting
#plugins=(插件1 插件2 插件3 zsh-syntax-highlighting)

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
#安装oh-my-zsh插件zsh-autosuggestions

vim ~/.zshrc
#在plugins=()中添加zsh-autosuggestions

国内源安装(Gitee)

bash
git clone https://gitee.com/mirrors/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
#安装oh-my-zsh插件highlighting

vim ~/.zshrc
#在plugins=()中添加zsh-syntax-highlighting
#plugins=(插件1 插件2 插件3 zsh-syntax-highlighting)

git clone https://gitee.com/mirrors/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
#安装oh-my-zsh插件zsh-autosuggestions

vim ~/.zshrc
#在plugins=()中添加zsh-autosuggestions

最后更新于:

未经许可禁止任何形式的转载