How to add composer vendor bin directory to path

Here’s how to add composer vendor bin directory to your path so you can call composer from your terminal.

Go to  ~/.bash_profile

your root directory would look something like this

Add the following to your ~/.bash_profile (Mac OS users) or into your ~/.bashrc (Linux users).

export PATH=~/.composer/vendor/bin:$PATH
a composer vendor bin directory in path

You can use any text editor to add this line to the file or create a new “.bash_profile” file in your root ~/ directory if you do not already have one.

Leave a Comment