Since 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
If it prompts you for sudo password use the default one.
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.
- Boot up your Pi and open the Linux terminal. (You must be logged in as the default user)
- Type sudo passwd root
- Now choose the password you wish for the root user and press enter.
- Now logout from the root user by typing logout
- Login now as root with the password you just created.
- 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.
- Now logout from root and login as the newname user you just created.
- You can change the password for the newname user by typing passwd and then providing the new password when prompted.
- 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.
- If it works then disable root by locking the password by typing sudo passwd -l root.