命令“git”可从 PowerShell 获得,我想知道 git 安装在我的 PC 上的哪个位置,所以我尝试执行这样的“脚本”
PS> where git
但执行后我什么也没看到,只提示输入新命令。
问题:如何在 Windows 10 中找到命令的路径?
最佳答案
在 Powershell 中, where
是 where-object
的别名,用于过滤集合。
Get-Alias -Name where
CommandType Name Version Source
----------- ---- ------- ------
Alias where -> Where-Object
在 Cmd 中,where 显示文件的位置。
Cmd 的
where
的 Powershell 版本是 Get-Command
Get-Command -Name git
CommandType Name Version Source
----------- ---- ------- ------
Application git.exe 2.20.1.1 C:\Program Files\Git\cmd\git.exe
关于windows - PowerShell 命令的程序路径在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62270559/