企业级——Linux系统初始化环境之SHELL

59 阅读1分钟

SHELL

  1. 安装ohmyzsh

GitHub: github.com/ohmyzsh/ohm…

方式一:

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

# 2. wget	
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

# 3. fetch	
sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

方式二:

# 1. curl
sh -c "$(curl -fsSL https://install.ohmyz.sh/)"

# 2. wget
sh -c "$(wget -O- https://install.ohmyz.sh/)"

# 3. fetch
sh -c "$(fetch -o - https://install.ohmyz.sh/)"
  1. 安装完以后检查
# 查看当前shell, 不出错误,应该是 zsh
echo $SHELL 
  1. 安装常用插件
# 高亮
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

# 自动补全
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

配置插件 ~/.zshrc

追加plugins

ohmyzsh内置的插件

内置已经存在的插件,如果启用可以追加到~/.zshrc plugins=(...)