This can be very useful when setting up a project or adding dependencies to a project.
Throughout my programming career I have Google’d
How to install composer globally and always search for the way to do it in one terminal command. Then the next time I need it that site is no longer there. So this post is for me so I no longer have to look for it!
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
composer into the terminal and you should see this:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer
Now you should be able to use composer globally by typing
composer in the terminal.