Freshly installed Drush is unresponsive I'm on an Amazon Linux machine.

I ran:

$ composer global require drush/drush
Changed current directory to /home/ec2-user/.composer
Using version ^8.1 for drush/drush
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files


Then I added composer into the PATH so it reads like this:

$ echo $PATH
/home/ec2-user/.composer/vendor/bin:/home/ec2-user/.composer/vendor/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/.local/bin:/home/ec2-user/bin


Then if I try this I get an error:

$ composer show drush/drush

  [InvalidArgumentException]
  Package drush/drush not found

show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated] [-D|--direct] [--] [&lt;package&gt;] [&lt;version&gt;]


And if I run the drush command the cursor stays there waiting:

$ drush


What did I miss?
So after a little investigation I realised I had a folder called drush in my home directory as well as something added by composed inside my home directory/.composer/vendor/bin/. I deleted these drush directories and ran composer again after which drush works fine.

[ec2-user@ip-... ~]$ ls
composer.json  drush  vendor
[ec2-user@ip-... ~]$ sudo rm drush
[ec2-user@ip-... ~]$ cd .composer/
[ec2-user@ip-... .composer]$ ls
cache  composer.json  composer.lock  vendor
[ec2-user@ip-... .composer]$ cd vendor/
[ec2-user@ip-... vendor]$ ls
autoload.php  composer  drush          nikic  psr  symfony
bin           dnoegel   jakub-onderka  pear   psy
[ec2-user@ip-... vendor]$ ls -la
total 52
drwxrwxr-x 12 ec2-user ec2-user 4096 May 12 07:25 .
drwxrwxr-x  4 ec2-user ec2-user 4096 May 11 20:59 ..
-rw-rw-r--  1 ec2-user ec2-user  183 May 12 07:25 autoload.php
drwxrwxr-x  2 ec2-user ec2-user 4096 May 11 20:59 bin
drwxrwxr-x  2 ec2-user ec2-user 4096 May 11 20:59 composer
drwxrwxr-x  3 ec2-user ec2-user 4096 May 11 20:59 dnoegel
drwxrwxr-x  3 ec2-user ec2-user 4096 May 11 20:59 drush
drwxrwxr-x  4 ec2-user ec2-user 4096 May 11 20:59 jakub-onderka
drwxrwxr-x  3 ec2-user ec2-user 4096 May 11 20:59 nikic
drwxrwxr-x  3 ec2-user ec2-user 4096 May 11 20:58 pear
drwxrwxr-x  3 ec2-user ec2-user 4096 May 11 20:59 psr
drwxrwxr-x  3 ec2-user ec2-user 4096 May 11 20:59 psy
drwxrwxr-x  6 ec2-user ec2-user 4096 May 11 20:59 symfony
[ec2-user@ip-... vendor]$ sudo rm -rf drush
[ec2-user@ip-... vendor]$ cd ../
[ec2-user@ip-... .composer]$ cd ../
[ec2-user@ip-... ~]$ composer global require drush/drush
Changed current directory to /home/ec2-user/.composer
Using version ^8.1 for drush/drush
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing drush/drush (8.1.2)
    Loading from cache

    Skipped installation of bin drush for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.launcher for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.php for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.bat for package drush/drush: name conflicts with an existing file
    Skipped installation of bin drush.complete.sh for package drush/drush: name conflicts with an existing file
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
Generating autoload files
[ec2-user@ip-... ~]$ drush
Execute a drush command. Run `drush help [command]` to view command-specific help.  Run
`drush topic` to read even more documentation. ......rest of output ommited