Last active
January 19, 2021 15:20
-
-
Save EvgenyArtemov/16000aa9de27611a2de3a18e3874ddc7 to your computer and use it in GitHub Desktop.
Add to the $PATH MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In the process of setting up a new Mac, I installed node.js. After the node.js installer finished, it recommended to add /usr/local/share/npm/bin to my path. It turns out there is a very neat way to do this in OS X, the /etc/paths file! The file contains a list (one per line) of paths that are added to the $PATH variable in the shell. Here are some quick directions to add to the path: | |
##Open up Terminal. | |
Run the following command: | |
sudo nano /etc/paths | |
Enter your password, when prompted. | |
Go to the bottom of the file, and enter the path you wish to add. | |
Hit control-x to quit. | |
Enter “Y” to save the modified buffer. | |
That’s it! To test it, in new terminal window, type: | |
echo $PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment