How do I install the latest Composer to Linux?

cd /usr/local/bin
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php
php -r "unlink('composer-setup.php');"
mv composer.phar composer2
chmod 777 composer2

How do I install Composer 1.x to Linux?