每天都学一点

在 Mac 和 Linux 我们可以使用 which 命令,来查看某个命令的绝对路径,例如:Windows 上 where 命令

05 03月
作者:林健|分类:Linux

在 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


    浏览1 评论0
    返回
    目录
    返回
    首页
    清理服务器硬盘空间 docker设置国内镜像源

    发表评论