Moving the composer.phar file from its current location to a global directory can be achieved by executing the following command within a Terminal window:
mv composer.phar /usr/local/bin/composer
We can now execute Composer commands globally by typing composer in the Terminal window.