One of the disadvantages of this is that the new location will only be honored for that particular Terminal session, when a new Terminal window is launched it will have the original default path again. Test it by running echo $PATH again in the Terminal. So here I have copied my existing path and added the new location on the end, colon separate the paths. You can add extra locations to your path, in the myscript.sh example above it’s location /Users/yourusername/bin/ which is not in the default path, you can add it in Terminal like so: PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin :/Users/yourusername/bin/ These directories are not visible by default in the filing system but you can make them visible.
0 Comments
Leave a Reply. |