1.where
C:\Users\admin>where git
D:\App\Git\cmd\git.exe
D:\App\Git\bin\git.exe
PS C:\WINDOWS\system32> where.exe git
D:\App\Git\cmd\git.exe
D:\App\Git\bin\git.exe
2.在PowerShell中使用Get-Command,简写gcm。(仅限PowerShell)
PS C:\WINDOWS\system32> Get-Command git
CommandType Name Version Source
----------- ---- ------- ------
Application git.exe 2.18.0.1 D:\App\Git\cmd\git.exe
PS C:\WINDOWS\system32> gcm git
CommandType Name Version Source
----------- ---- ------- ------
Application git.exe 2.18.0.1 D:\App\Git\cmd\git.exe