Running Composer

The resulting file will be called composer.phar, a PHP Archive that can be executed directly via PHP. However, in my case, I want Composer to be accessible globally by simply typing composer. To do this, move it to/usr/bin/ and create an alias:

1

2

sudo mv composer.phar/usr/local/bin/

vim~/.bash_profile

Add this to your .bash_profile. It may be empty or non-existent, so go ahead and create it:

1

alias composer="php /usr/local/bin/composer.phar"

Now, relaunch your terminal and you’ll be able to access Composer simply by calling composer.