1##update composer in ubuntu
2#update packages
3sudo apt-get update
4#if you don't have curl install it
5sudo apt-get install curl
6#download installer
7sudo curl -s https://getcomposer.org/installer | php
8#move composer.phar file
9sudo mv composer.phar /usr/local/bin/composer
10#check composer version
11composer -v
1you need to first remove the composer
2
3->sudo apt-get remove composer
4
5and then type the below command to install composer globally
6
7->sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
8
9for more info :
10click on the link below