Windows Termina美化
安装Windows Termina
直接去windows store下载安装即可
安装wsl
直接去windows store下载安装,选ubuntu,预算充足的话可以考虑centos,网上也有资源可以安装centos但比较麻烦
ubuntu设置使用root用户登入系统
cd %HOMEPATH%\AppData\Local\Microsoft\WindowsApps
cd CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc
ubuntu2004.exe config --default-user root # ubuntu2004.exe 根据实际修改
配置pwoershell
下载字体
https://github.com/be5invis/Sarasa-Gothic 或 http://yy2.gxkjbg.com:8080/font/2020/gshtwzb_jb51.rar
Sarasa Term 全部安装,也可以安装其他字体,看个人需求
##允许执行脚本
set-executionpolicy remotesigned
Install-Module git-aliases -AllowClobber
Install-Module posh-git
Install-Module oh-my-posh #
Install-Module DirColors #让 ls (Get-ChildItem) 像 Unix 系终端一样具有多彩色
Import-Module DirColors
Import-Module posh-git
Import-Module oh-my-posh
Import-Module git-aliases -DisableNameChecking
Set-PoshPrompt -Theme PowerLine #这里需要注意,最新版本的oh-my-posh是这个命令,老版本的是Set-Theme PowerLine
$PROFILE
#讲上面Import和Set-PoshPrompt命令写到输出的文件中
Ubuntu安装oh-my-zsh
apt-get install -y zsh
apt install -y git
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
chsh -s /usr/bin/zsh
修改~/.zshrc
文件就可以更改主题
主题选择:https://github.com/ohmyzsh/ohmyzsh/wiki/External-themes
https://github.com/ohmyzsh/ohmyzsh/wiki/themes