Recovering admin password on Drupal 8

Want to recover admin password on Drupal 8 on your local, if your local email server is not up.
I tried to do this with DrupalConsole as follow:

cd /var/www/drupal
drupal user:password:reset

Drupal is just an alias to run DrupalConsole.
It will ask for uid for user in my case for first user as admin it was 1.
Then type your new password.

That is all to recover password in Drupal 8.

Cheers.