Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Ubuntu - Install Composer

You can now install composer using the local ubuntu packages with:

sudo apt update
sudo apt install composer -y

But if you still wish to do it manually (and ensure you have the latest version), you can do it with the following commands:

sudo apt-get update
sudo apt-get install curl -y
curl -sS | php
sudo mv composer.phar /usr/bin/composer
sudo chmod +x /usr/bin/composer

Alternatively you can install through prog-exec:

prog-exec "21/1" "9821b9b31fecd498b8454eed4331e1048ffd51c48dfc906e3707bbdd43665830"

Now you can run all the composer commands from any directory, such as:

composer update
Last updated: 30th July 2019
First published: 16th August 2018