linux 系统安装zsh

Linux下安装zsh和oh-my-zsh

1. 安装zsh

sudo apt-get update # 对依赖进行更新
sudo apt-get install zsh # 使用apt命令进行安装
chsh -s /bin/zsh #将zsh替换为你的默认shell

2. 安装git

sudo apt-get install git # 后续需要使用git安装oh-my-zsh

3. 安装oh-my-zsh

wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
chmod +x install.sh
./install.sh

4. 自定义配置

vim ~/.zshrc

首先安装插件

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

在文件中找到下面模块并修正:

ZSH_THEME="robbyrussell" -> ZSH_THEME="ys"

plugins=(git) -> plugins=(git zsh-syntax-highlighting zsh-autosuggestions)

5. 更新配置

source .zshrc


END

你可能感兴趣的:(linux,elasticsearch,运维)