Windows 安装美化的Oh-my-zsh超美终端

由于新设备的到来,不可避免重新安装系统环境,由此就有了重装oh-my-zsh这个超级美化终端

本人使用的是Win11 自带的终端,需要提前下载wsl ,管理员运行powershell执行wsl install下载

之后选择小企鹅的Ubuntu

安装zsh

clone oh-my-zsh

1
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

复制 .zshrc

1
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

更改默认 Shell

1
2
3
4
5
6
7
8
# 查看正在使用的主题
echo #SHELL

# 查看shell类型
cat /etc/shells

# 更改shell为zsh
chsh -s /bin/zsh

更换主题配置

1
2
3
4
5
6
7
8
9
10
# 查看oh-my-zsh自带主题
cd ~/.oh-my-zsh/themes && ls

vim ~/.zshrc

# 更改内容
ZSH_THEME="cloud"

# 更新配置
source ~/.zshrc
  • 注意保存内容

增加插件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 进入插件部分
cd ~/.oh-my-zsh/custom/plugins/

# 克隆插件仓库
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git #高亮仓库
git clone https://github.com/zsh-users/zsh-autosuggestions #代码提示仓库

# 更改内容
vim ~/.zshrc

# 更改内容
plugins=(
git
zsh-syntax-highlighting
zsh-autosuggestions
)

# 更新配置
source ~/.zshrc

最终展示

SanXiaoXing