RPi Car Computer Part 2: Boot to Desktop, Expand root and Change Password

Raspberry Pi LogoSince our Raspberry Pi is now operational let’s move on to the next part. In this part of the tutorial we will setup our Pi to always boot to the Linux GUI (boot to desktop) and expand our Operating System to utilize the full storage of the SD card we are using.

Expanding our OS to utilize the whole SD card

From the GUI you should open the terminal and type

sudo raspi-config

If it prompts you for sudo password use the default one.

It will bring up a screen like the following.
raspi configFrom here select expand_rootfs

This will expand the OS root directory and the whole SD card space will be available for you to use.

Boot to Desktop on Pi Startup

From the same screen that you currently are you can select the boot_behaviour.
This set the GUI as the default location when Raspberry Pi boots up so you will no longer be needed to write startx everytime it starts up.

Changing the default Username and password

As we noted before the Pi comes with a default user pi and default password Raspberry. To change this there are a few ways. The easier way (to me at least) is as follows.

  1. Boot up your Pi and open the Linux terminal. (You must be logged in as the default user)
  2. Type sudo passwd root
  3. Now choose the password you wish for the root user and press enter.
  4. Now logout from the root user by typing logout 
  5. Login now as root with the password you just created.
  6. To rename the user pi to something you wish you can do so using the command usermod -l newname pi where you can replace newname with the username you wish.
  7. Now logout from root and login as the newname user you just created.
  8. You can change the password for the newname user by typing passwd and then providing the new password when prompted.
  9. If you wish you can disable the root user you enabled. But first while logged in with the newname user type sudo apt-get update to verify that you have sudo privileges with his user.
  10. If it works then disable root by locking the password by typing sudo passwd -l root.

Please follow and like us:

Leave a Reply