142 字
1 分钟
Powershell-config
2025-11-08
无标签

对于Win上的powershell有关配置值得说明一下

  • 现在推荐使用微软维护的最新版Powershell。win自带的powershell是个老旧版本。也可使用winget下载 winget install Microsoft.PowerShell
  • 且终端推荐使用WindowsTerminal
  • 使用ohmyposh 安装
winget install JanDeDobbeleer.OhMyPosh --source winget
# 没有winget 就手动下载
# Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
  • 设置powershell的配置文件
# ohmyposh 以某一主题启动
oh-my-posh init pwsh --config "powerlevel10k_classic" | Invoke-Expression
  • 设置Powershell的终端字体,比如为Maple Momo CN NF,并将Windows Terminal的默认终端设置为之前下载的pwsh
Powershell-config
https://yjdyamv.github.io/posts/powershell-config/
作者
Yjdyamv
发布于
2025-11-08
许可协议
CC BY-NC-SA 4.0