Setting it All Up
The most basic thing to do now is to assemble everything. Keep the power turned off. Once you’ve connected everything, you can turn it on then. Connecting everything to the Pi is pretty easy. You should also make sure that you have a properly formatted SD card before you even turn on the Raspberry Pi. If you’ve bought a pre-loaded SD card then the Raspberry Pi should just start up but if there’s a problem of some sort then you might experience a lot of problems booting your Pi.
Since Linux has collaborated to give Raspberry Pi it’s very own Distro, the Debian Raspbian, the Raspberry Pi does tend to function more smoothly with a Linux OS. Despite that, there are plenty of other distros available for the Pi but we’ll focus on the ever popular Raspbian.
Now using Windows, you should download Raspbian and make sure that it’s the latest version. Once you’ve downloaded it, unzip the .img file. Now download Win32DiskImager and unzip the application (.exe file). Using a card reader, insert the SD card in your PC. Open the recently downloaded Win32DiskImager by double clicking it.
If you’re on Windows 7 or 8, then right click and choose “Run as Administrator”. In the section for image files, click the little folder icon and choose the recently downloaded Raspabian.img file. Now click on the Write button and wait for the magic to happen. Once it’s done, you can eject your SD card and put it in the Raspberry Pi.
If you bought a pre-loaded SD card then you can skip this step but if you didn’t then pay attention. You’re going to have to download Raspbian but you’ll have to be very careful otherwise you run the risk of corrupting the hard drive of the computer you’re using.
Now that your SD card is ready, you can finally turn on your Raspberry Pi. You’ll have to configure a few things but you’ll know that it’s ready since it’ll show you the Raspi-config window. You can mess with a lot of the setting of your Raspberry Pi here. However, the first thing that you should do is expand the file system so that you it allows you to use all the space on your SD card.
To do that, you need to select expand_rootfs and press enter. Confirm that you’re expanding the file system and then let Raspbian do what it needs to do. It’ll take you automatically to the configuration list once it’s done. When you get to the configuration list, go to the very bottom of the list and choose Finish. You’ll be asked then if you want to reboot. Choose yes.
The Raspberry Pi will then reboot and take it’s time to expand the system file. When you’ll be asked to log in, you can do so easily with the help of the default password and username:
It’ll take you to a prompt screen where you can type: startx
Once you’ve done that, your Raspberry Pi is officially live and functioning. You can also access the Raspi-Config by using the command sudo raspi-config in the terminal.
You can take a look at the table below which explains other functions of the Raspi-Config:
Pi and SSH
It’s possible to enjoy ‘headless’ (using it without a monitor that’s dedicated to it) use of your Raspberry Pi if you’ve got SSH available. Luckily, you don’t have to download anything since this is always enabled by default. As long as you’re able to connect your Pi with the same network that your computer is connected to and you have an SSH utility running such as PuTTY on your PC, you’ll be able to enjoy SSH connection with your Pi within seconds.
You can also configure PuTTY. Go to the Session screen; put the IP address of your Raspberry Pi in the place for IP address or the Host Name field. Ensure that the SSH is selected and click on Open. You can easily login to your Pi by using the credentials that are provided by your chosen distro. For example: if you’re using Raspbian, then the password and username are already available on the download page for Raspbian.
The Command Line
The Raspberry Pi is run with the help of the command line. Owing to the fact that Raspbian is made by Linux, it runs on the same format that other Linux distros run on. Therefore, you’ll have to rely on issuing commands through the command line. The command line will be found from within the StartX GUI.
You might feel a bit shy or daunted which will make you hesitant to want to use the command line. However, with usage and practice, you’ll soon start to feel more comfortable with the command lines. Furthermore, there are instances when it’s preferable and required that you use the Command line for certain functions such as starting and shutting down the Raspberry Linux
Starting and shutting it down safely
Starting and shutting down the Raspberry Pi depends solely on the command line. Since the Raspberry Pi has an SD card, it’s not possible to simply shut it down by turning off the power supply. This would lead to corrupting the card and you’ll have to re-format your SD card re-configure your Raspberry Pi too.
The only way to safely turn off the Raspberry Pi is to use the command lines and issue the following commands:
To start: startx and
To shutdown: sudo shutdown – h now
Luckily, there’s also an option to shutdown on the desktop but you’re still going to have to issue a command to turn it on. Here are some other useful commands that you should know:
- Shutdown your Pi in 1 minute:
sudo shutdown -h 1
- Reboot your pi in 1 minute:
sudo shutdown -r 1
- Get manual for any command:
man [command] e.g. man shutdown
The Pi was made to make programming easy and affordable and it’s something which has succeeded in both these goals. The Raspberry Pi supports the Python and that is the primary programming language. Users who have experience with Python will be able to breeze through Raspberry Pi. Luckily, for beginners, the Raspberry ships a built in module known as a Pygame which functions as a fun, programming building game. This lets you have fun and learn the basics as easily as possible.