在 Mac 和 Linux 我们可以使用 which 命令,来查看某个命令的绝对路径,例如:Windows 上 where 命令
在 Mac 和 Linux 我们可以使用 which 命令,来查看某个命令的绝对路径,例如:
❯ which go
/usr/local/go/bin/go
在 Windows 上我们可以使用 where
> where node
C:\bin\node-v19.8.1-win-x64\node.exe
我测试了下,发现只有 cmd 支持,我用 powershell 和 nu shell 都不支持。
解决方法是,使用 where.exe
> where.exe node
C:\bin\node-v19.8.1-win-x64\node.exe
或者使用 gcm
> gcm node
CommandType Name Version Source
----------- ---- ------- ------
Application node.exe 19.8.1.0 C:\bin\node-v19.8.1-win-x64\node.exe
目录 返回
首页