I have just installed composer in my /usr/bin folder, so when from that folder I run php composer.phar I get the help info about composer. But, whe
First install the composer like mentioned in the composer installation documentation. I just added here for reference.
curl -sS https://getcomposer.org/installer | php
and then move the file to '/usr/local/bin'.
sudo mv composer.phar /usr/local/bin/composer
Try to run composer -V. If you get a output like Composer version followed by the version number then the composer is installed successfully.
If you get any output like composer: command not found means use the following command to create a alias for the composer. So it will be executed globally.
alias composer='/usr/local/bin/composer'
Now if you run composer -V means you will get the output as Composer Version followed by the version number.
Hope this will help someone.