跳到主要内容

清除 Powershell 历史记录

· 阅读需 1 分钟
1adybug
子虚伊人
  • 历史记录保存位置,直接删除不想要的行即可

    echo (Get-PSReadlineOption).HistorySavePath
  • 或者直接删除文件

    Remove-Item (Get-PSReadlineOption).HistorySavePath

需要重启终端才能生效