With Drush:

`drush php-eval 'node_access_rebuild();'`

With Drupal Console:

`drupal node:access:rebuild`

Which is of course similar to Chamil's answer, but accessible and copy pastable :)