If i type \"composer\" i get the above error message.
I did on my macbook:
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /us
Tested on Mac OSX after installing via instructions on composer website:
sudo mv composer.phar /usr/local/bin/composer
This works on Ubuntu;
alias composer='/usr/local/bin/composer/composer.phar'
If you have to run composer with sudo, you should change the directory of composer to
/usr/bin
this was tested on Centos8.
Globally install Composer on OS X 10.11 El Capitan
This command will NOT work in OS X 10.11:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer
Instead, let's write to the /usr/local/bin path for the user:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Now we can access the composer command globally, just like before.