Small tip: For Linux or Mac, actually Bash.

How to add a folder to the path?

Add directory to the beginning of the path

PATH=/folder/to/add:$PATH

Add directory to the end of the path

PATH=$PATH:/folder/to/add

Need it permanent?

Just add it to your .bashrc file. note the leading dot