我使用最新的 Macintosh 安装程序为 Macintosh 安装了 node.js。现在,我想按照安装程序的指示检查/usr/local/bin 是否在 $PATH 中。我已经打开了 Terminal 应用程序,并在网上搜索了相关帮助,但是对于如何完成上述任务,然后启动 node.js 进程,我感到迷茫。有人能澄清一下吗?非常感谢。
echo $PATH will print your path. If you see /usr/local/bin between some colons, then it's in your path.
echo $PATH
/usr/local/bin
open terminal and type the command below
You should see something like this
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
the presence of /usr/local/bin in the output means you are good to go