In the previous module you connected your Raspberry Pi together except for the power supply. Plug in the power supply. Make sure you use at least a 700mA 5V power supply. This is the same type of power adapter that is used with some Samsung phones.
When the Raspberry Pi has booted up you will need to login using the correct user name and password. Enter pi for the login and raspberry for the password.
You are presented with a black screen and a prompt. This prompt is waiting for a command from a user. Remember in the previous discussion on operating systems and the simplistic view of how they function? Well the operating system can now accept a command from an external input, in this case the keyboard and process that information to display a result.
Go ahead and enter the following.
The output will display a list of files because the ls command is understood by the operating system. The next command will restart the Raspberry Pi.
After a few minutes the Raspberry Pi will reboot and you will be back at the command line prompt. Log back in by entering your login name and password.
The next command will start the desktop. Enter the following command.
The desktop will appear but the screenshot above may appear different.
The desktop will be explored later but for now you will shut down the Raspberry Pi from the desktop. Click your left mouse button on the red power button at the bottom of the desktop.
From here you can Logoff, reboot or shut down the Raspberry Pi.
Click on the reboot button.
Log back in and enter the following command.
sudo shutdown -r 0
This command will also reboot the Raspberry Pi by performing the same command as the reboot command. Sudo is a command that allows a regular user to perform administrative commands, also known as root or admin. The reason sudo is used is because it can be used to safeguard users from causing problems to the system. For example you would not want to accidentally remove all the files from the operating system and to have the system rendered useless.
Shutdown is the command and -r is a flag which is used by the shutdown command. In this case the -r means reboot. 0 is the time in minutes before the shutdown occurs.
When the Raspberry Pi has rebooted, log back into the Raspberry Pi and enter the following command.
sudo shutdown -r 10 “I am going to reboot the Raspberry Pi”
This will reboot the Raspberry Pi after 10 minutes but this time it will display a message.
Enter this command.
sudo shutdown -h 30
Again the sudo command is used because this is a privileged command but the -h is a flag and in this case means halt. This is going to stop the system from rebooting and will shut down the Raspberry Pi completely. The number 30 means that in 30 minutes time the system will shut down.
Next Raspberry Pi Week 2 – Overview >>