I followed the documentation on https://getcomposer.org/doc/00-intro.md#globally to install composer globally on arch linux. When I do composer self-update, I g
composer self-update
make sure composer already at /usr/local/bin and then do following things
/usr/local/bin
chmod 755 composer
if permission denied, add sudo
sudo