Why could Drush not find the alias @local? I am usin Drupal 8 and Drush 8. I have ~/.drush/local.aliases.drushrc.php. That is the only alias under ~/.drush

Inside local.aliases.drushrc.php, I have

$aliases['local'] = array(
  'root' =&gt; '/var/www/html/test/testme/amber/amber_school_dev',
  'uri' =&gt; 'http://amber_school_dev.local',
);


Run this drush @local status --debug

Using the Drush script found at /home/kenpeter/.composer/vendor/drush/drush/drush.launcher using pcntl_exec
Cache HIT cid: 8.1.8-commandfiles-0-88373346a2ca94c0c49a48b75b15bd40 [0.02 sec, 3.23 MB]                                                [debug]
$aliases['local'] = array(
  'root' =&gt; '/var/www/html/test/testme/amber/amber_school_dev',
  'uri' =&gt; 'http://amber_school_dev.local',
);

$aliases['local'] = array(
  'root' =&gt; '/var/www/html/test/testme/amber/amber_school_dev',
  'uri' =&gt; 'http://amber_school_dev.local',
);

$aliases['local'] = array(
  'root' =&gt; '/var/www/html/test/testme/amber/amber_school_dev',
  'uri' =&gt; 'http://amber_school_dev.local',
);

Could not find the alias @local [0.06 sec, 6.05 MB]                                                                                 [error]
Undefined index: command notify.drush.inc:60 [0.06 sec, 6.06 MB]                                                                       [notice]
Undefined index: command notify.drush.inc:60 [0.06 sec, 6.06 MB]                                                                       [notice]


drush sa in site root gives me

@none
@self
default
You are missing the &lt;?php at the beginning of your aliases file. That's why the contents of your file are printing out when Drush tries to load them.