【Ubuntu】安装zsh 和 oh my zsh

安装zsh: 

sudo apt install zsh

查看当前系统Shell:

# 输出本机
echo $SHELL

# 修改本机默认shell (交互式修改)
chsh

# 修改默认Shell为zsh
chsh -s /bin/zsh

安装oh my zsh:

# gitee
sh -c "$(curl -fsSL https://gitee.com/shmhlsy/oh-my-zsh-install.sh/raw/master/install.sh)"

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

安装插件:

#插件推荐
plugins=(
        zsh-autosuggestions
        zsh-syntax-highlighting
        zsh-history-substring-search
        z
        extract
        sudo
        git)

#自带插件
z、extract、sudo、git

#下载插件
##################gitee##################
# 语法高亮
git clone https://gitee.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 命令建议
git clone https://gitee.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# 历史命令提示
git clone https://gitee.com/zsh-users/zsh-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search

##################github##################
# 语法高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 命令建议
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-history-substring-search ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-history-substring-search

你可能感兴趣的:(ubuntu)