how to add directory to PATH code example
Example 1: cmd add to path
set PATH=%PATH%;C:\your\path\here\
setx /M PATH "%PATH%;C:\your\path\here\"
Example 2: how to add a directory in path linux
nano ~/.bashrc
export PATH=$PATH:ADDRESS
export PATH=$PATH:/usr/local/hadoop
Example 3: add directory to path windows 10
setx /M PATH "%PATH%;<your-new-path>"
Example 4: how to add a directory to path
export PATH="$HOME/bin:$PATH"
Example 5: how to add a directory to path in linux
export PATH="$HOME/bin:$PATH"
Example 6: add to path to PATH
FOR MAC:
1º - Open Finder
2º - Choose Go > Go to folder
3º - Go to ~/Library/
4º - Look for hidden files: Cmd + Shift + . (dot)
5º - Depending on the shell you use, the file can be .bash_profile, or .bashrc, or .zshrc, ...
6º - Open that file in the text editor
7º - Add the new path like: export PATH="$PATH:"User/new_path/..."
8º - Test in your command line if it worked: echo $PATH