117 字
1 分钟
Ubuntu 安装 zsh
安装 zsh
sudo apt-get install zsh -y查看系统自带的 shell
vps-2bc29f89% cat /etc/shells# /etc/shells: valid login shells/bin/sh/usr/bin/sh/bin/bash/usr/bin/bash/bin/rbash/usr/bin/rbash/usr/bin/dash/usr/bin/screen/usr/bin/tmux/bin/zsh/usr/bin/zsh/usr/bin/zsh将 zsh 设置为默认的 shell
sudo chsh -s /usr/bin/zsh $USER使用以上命令,可以避免使用证书登录而无法输入密码的情况。
安装插件
sudo apt-get install -y zsh-autosuggestions zsh-syntax-highlighting command-not-found配置~/.zshrc:
# command_not_foundsource /etc/zsh_command_not_found
# completionautoload -Uz compinitcompinit
# better completion menuzstyle ':completion:*' menu selectzstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
# autosuggestionssource /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# syntax highlightingsource /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh Ubuntu 安装 zsh
https://blog.echopath.one/posts/install-zsh-on-ubuntu/