记录如何从bash切换到zsh,如何使用oh-my-zsh对终端进行美化以及zsh一些常用插件的安装。
文章目录
安装zsh
- 直接使用apt命令安装即可
sudo apt-get install zsh
- 切换为shell为zsh
chsh -s /bin/zsh
美化zsh
这是我修改后的终端样式:
安装 Powerlevel10k主题
- 使用git进行下载
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
- 打开zsh的配置文件
sudo vim ~/.zshrc
- 选择主题为我们下载主题
ZSH_THEME=powerlevel10k/powerlevel10k
- 保存并关闭
安装字体
为了防止终端可能会出现乱码,也是因为你的电脑不支持那么多字体,所以我们需要先安装扩展字体。
Powerlevel10k 作者推荐使用 Meslo Nerd Font字体,Download these four ttf files:
[MesloLGS NF Regular.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS NF Regular.ttf)
[MesloLGS NF Bold.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS NF Bold.ttf)
[MesloLGS NF Italic.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS NF Italic.ttf)
[MesloLGS NF Bold Italic.ttf](https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS NF Bold Italic.ttf)
Double-click on each file and click “Install”. This will make
MesloLGS NF
font available to all applications on your system.
WSL配置字体其实就是配置终端的字体,点