After composer installation , please follow below steps:
Open your shell configuration file: Open the shell configuration file (~/.bashrc
, ~/.bash_profile
, or ~/.profile
) in a text editor. For example:
nano ~/.bashrc
add the Composer’s binary directory to your PATH as well:
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
This allows you to run Composer globally for your user account.
Save and Close the File: Save the changes you made to the file and close the text editor.
Apply the Changes: Apply the changes to your current shell session by running:
source ~/.bashrc
Verify: You can now verify that Composer is installed and available by running:
composer --version