wsl2 配置zsh

作者: dreamfly 分类: linux 发布时间: 2021-02-21 11:23

wsl2配置zsh步骤

更新系统

sudo apt update
sudo apt upgrade

检查zsh是否安装

cat /etc/shells

如果没有安装的话

sudo apt install zsh

下载oh-my-zsh

国内的网络,可能需要配置下hosts,可以参考文章《配置github.com的host访问

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

安装PowerLevel10k主题

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k

配置主题

修改家目录.zshrc文件,设置主题为powerlevel10k

ZSH_THEME="powerlevel10k/powerlevel10k"

通过下面命令设置样式

p10k configure

配置p10k样式

安装字体,放入到c:\windows\fonts

字体下载地址:github

MesloLGS NF Regular.ttf
MesloLGS NF Bold.ttf
MesloLGS NF Italic.ttf
MesloLGS NF Bold Italic.ttf

设置远程连接字体

"fontFace": "MesloLGS NF"

激活插件,修改.zshrc配置文件

plugins = (git fasd)

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!

评论已关闭!