mac environment variables path code example

Example 1: update path variable mac

export PATH=$PATH:/new/dir/location1
export PATH=$PATH:/new/dir1:/dir2:/dir/path/no3

Example 2: which path variable should i use in mac

export PATH=$HOME/bin:./node_modules/.bin:$PATH

Example 3: adding this directory to PATH mac

sudo nano /etc/paths

https://www.architectryan.com/2012/10/02/add-to-the-path-on-mac-os-x-mountain-lion/

Example 4: mac set environment variable

HIMANSHUs-MacBook-Pro:~ himanshu$ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home

Tags:

Misc Example