Change the RaspberryPi default username

A couple of quick commands to change the default username (pi) that is configured when you install Raspbian for the first time:

Login to a text console, ie: Ctrl+F1. Then execute the following commands:

  1. exec sudo -s
  2. cd /
  3. usermod -l newusername -d /home/newusername -m pi

Thanks to this StackOverflow post.