Oh My ZSH! 好用!推荐!

本文默认你拥有 root 权限,默认你会配置 sudo 权限。

安装相关的软件包

Debian 系的系统建议使用 nala 管理自己的软件包,可以很方便地回滚现有的操作,也可以方便地查看都安装了什么包,还可以方便地优选速度最快的镜像。

nala install git zsh tree zip unzip -y

设置 ZSH

chsh -s /bin/zsh

Almalinux 环境默认没有 chsh 命令

dnf install util-linux-user

安装 Oh My ZSH!

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

设置主题

可以选择其它主题,我只是认为这个主题比较适合我自己。

sed -i '/^ZSH_THEME=.*/c ZSH_THEME="ys"' ~/.zshrc

安装自动补全功能

git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-autosuggestions

配置自动补全

编辑配置文件

vim ~/.zshrc

找到

plugins=(git)

修改为:

plugins=(
    git
    zsh-autosuggestions
)

重新连接 ssh

Enjoy it !!!