本文介绍了PowerShell命令的程序路径在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
命令'git'可从PowerShell中获得,我想知道git在我的PC上的哪里安装,所以我尝试执行这样的'script'
Command 'git' is available from PowerShell, I want to know where is git installed on my PC, so I tried to execute such 'script'
PS> where git
但是执行后我什么也没看到,只提示输入新命令.问题:如何在Windows 10中找到命令的路径?
but after execution I see nothing, only prompt for new command.Question: How can I find path for command in Windows 10?
推荐答案
在Powershell中,where
是 where-object
,用于过滤集合.
In Powershell, where
is an alias for where-object
, which is used to filter collections.
Get-Alias -Name where
CommandType Name Version Source
----------- ---- ------- ------
Alias where -> Where-Object
在Cmd中,显示其中文件的位置.
In Cmd, where displays location of files.
Cmd where
的Powershell版本为 Get-Command
The Powershell version of Cmd's where
is Get-Command
Get-Command -Name git
CommandType Name Version Source
----------- ---- ------- ------
Application git.exe 2.20.1.1 C:\Program Files\Git\cmd\git.exe
这篇关于PowerShell命令的程序路径在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!