[Tutorial] How to install Raspbian on the Raspberry Pi

in #technology7 years ago

I have already introduced the different models of the Raspberry Pi and collected 7 reasons why you should buy a Raspberry Pi. If you decided to buy one, you now need an operating system to use the Pi so I´m back with my first tutorial. You can install Raspbian, Pidora, Ubuntu, Arch Linux ARM, RISC OS, OpeneELEC or other operating systems. I recommend to use Raspbian because it is a Debian distribution, which is designed and optimized for the ARM-architecture of the Raspberry Pi.
Let us start with the installation of Raspbian. Therefore you need a SD-card with 4 GB or more, which has a speed classification of Class 6 or faster. (recommended is more than 8 GB Class 10)

Step 1:

Download the Raspbian image from the official website (http://www.raspberrypi.org/downloads). After the download you have to unzip the .ZIP-file, in which you can find a IMG-file containing the operating system. Windows user also need the tool “Win32 Disk Imager” to flash the SD-card with the IMG-file. Linux users have to install the package dd.

Step 2:

Windows
Execute the Win32DiskImager.exe. In the field „Image File“ you have to mount the downloaded Raspbian image. In the field “Device” you have to choose the drive on which you want to install Raspbian. If you are sure that the choice is correct, click the “Write” button.

Linux/Mac OS X
To flash the image you can use the software dd. Type followind commands in the console and change [IMG] to the path of your image-file and [DEVICE] to your path of the SD-card.

dd bs=1M if=[IMG] of=[DEVICE]

Step 3:

Now plug the SD-card into your Raspberry Pi just before you plug the micro-USB in.
Connect the ethernet cable to your Pi and to your router. If you want to set up the Raspberry over remote, you need to connect via SSH. Otherwise you have to plug in a keyboard, a mouse and a monitor.

Step 4:

After the Raspberry initiated all files for the first start you can see a grey-blue interface in which you can navigate with arrow keys, enter and escape on your keyboard. Here you can do some settings.
In case of a SSH-connection you have to execute following command:

sudo raspi-config

Step 5:

First you have to choose Expand Filesystem to use the complete disk space of the SD-card.
After a short time the expansion is approved but it is only completet after reboot. Maybe the reboot takes a few minutes.

Step 6 (only for access via keyboard and HDMI):

Now we choose Internationalisation Options > Change Keyboard Layout if you want to change the keayboard layout. Then you can choose Internationalisation Options > Change Locale to change the timezone and the language

Step 9:

Press finish to complete the setup and the Pi will reboot.

Step 10:

After reboot you can update Raspbian with followiung commands in the console.
The default username is pi and the default password is raspberry. First type pi then raspberry (password input won´t be displayed).

sudo apt-get update && sudo apt-get upgrade

Step 11 (optional):

It is recommended to enlarge the SWAP to double size of the RAM but 1024 MB should be enough.
How to do this i will explain in another article.
If you are connected via monitor and keyboard you can now use the GUI of Raspbian executing the command startx.

Stay tuned and follow me for more articles, DIY guides, tutorials and interesting projects about the Raspberry Pi.