mac And add the bin directory to the PATH environment variable code example
Example 1: $path mac
sudo nano /etc/paths
Example 2: mac add a directory to path
cp bin/phantomjs.app/Contents/MacOS/phantomjs /usr/local/bin
sudo nano /etc/paths
cp bin/phantomjs.app/Contents/MacOS/phantomjs /usr/local/bin