Add Directory to PATH When Using macOS

The default shell when using macOS is ZSH. If you want to add a directory to the PATH variable, you can create a file named ~/.zshenv:

nano ~/.zshenv

Now, you can use this file to add a directory to the path, in this case, ~/.composer/vendor/bin will be added to the PATH:

export PATH="$HOME/.composer/vendor/bin:$PATH"

Leave a Comment