Ubuntu终端安装zsh
# zsh
简介
Zsh
是一款功能强大的Shell
软件,既可以作为交互式终端来使用,也可以作为脚本语言解释器来使用。
# 安装zsh shell
sudo apt install zsh
1
# 查看当前使用的zsh shell
echo $SHELL
1
# 切换shell
chsh -s /bin/zsh
1
# 安装oh-my-zsh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
1
# 安装插件
# 安装zsh-syntax-highlighting
语法高亮插件
下载
zsh-syntax-highlighting
语法高亮插件git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-syntax-highlighting
1下载
zsh-autosuggestions
自动提示插件git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh}/plugins/zsh-autosuggestions
1配置
.zshrc
文件# 找到plugins=(git)的位置,添加zsh-syntax-highlighting和zsh-autosuggestions plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
1
2保存后执行
source ~/.zshrc
保证配置文件更新
# 安装主题配套字体powerline/fonts
sudo apt install fonts-powerline
1
更新时间: 2023/2/10 09:50:10