How to install Composer on Debian / Ubuntu Linux

Composer is a dependency manager for PHP, which helps you manage the packages and libraries required for your PHP projects. Here’s how to install Composer on Debian or Ubuntu Linux:

  1. Open a terminal window.
  2. Download the Composer installer script by running the following command:
curl -sS https://getcomposer.org/installer | php
  1. Move the composer.phar file to a directory that is in your system’s PATH, so you can run Composer from anywhere. For example:
sudo mv composer.phar /usr/local/bin/composer
  1. Make the composer file executable:
sudo chmod +x /usr/local/bin/composer
  1. Verify the installation by running the following command:
composer --version

This should display the version of Composer that you have installed.

Now that Composer is installed, you can use it to manage dependencies for your PHP projects. For more information on how to use Composer, refer to the official documentation at https://getcomposer.org/doc/.

Leave a Comment