Are you adding composer to your path? If you are using bash:
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
To reload the .bashrc file
source ~/.bashrc
May Sale! All accounts are 40% off this week.
hi all i uninstall composer then reinstall it and set every thing
now when i type php compser.phar in terminal it give me composer and everything is fine but when i write composer it give -bash: composer: command not found
what can i do for that??
@FATIMA1 - Have you renamed your composer.pharto just composer and moved it to a folder in the $PATH?:
mv composer.phar /usr/local/bin/composer
/usr/local/bin is already added in your path, so it should work, then with the command I said above you will have your global composer packages available.
Please or to participate in this conversation.