Skip to content

Instantly share code, notes, and snippets.

@florido
Forked from nellynette/Modify PATH
Last active June 5, 2018 00:33
Show Gist options
  • Save florido/bfbfa5099dfe9d8f85e38afb5117160c to your computer and use it in GitHub Desktop.
Save florido/bfbfa5099dfe9d8f85e38afb5117160c to your computer and use it in GitHub Desktop.
Modify PATH
#to set the variable PATH to the value /bin:/sbin:/user/bin:/user/sbin:/system/Library/, you would enter the following command in a Terminal window:
$ PATH=/bin:/sbin:/user/bin:/user/sbin:/system/Library/ export PATH
#This modifies the environment variable PATH with the value assigned.
#To view all environment variables, enter:
$ env
New PATH
Prioritize local folder instead of system folder
$ PATH=/bin:/sbin:usr/local:usr/local/bin:/user/bin:/user/sbin:/system/Library/ export PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment