Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware. An operating system is the set of basic programs and utilities that make your Raspberry Pi run. However, Raspbian provides more than a pure OS: it comes with over 35,000 packages, pre-compiled software bundled in a nice format for easy installation on your Raspberry Pi.
The initial build of over 35,000 Raspbian packages, optimized for best performance on the Raspberry Pi, was completed in June of 2012. However, Raspbian is still under active development with an emphasis on improving the stability and performance of as many Debian packages as possible.
Installing Rasbian on your SD card
- Insert your microSD card into your card reader and find out its drive letter in Windows Explorer (for example G:).
- Download Win32DiskImager, unzip the downloaded file and run the utility file.
- Select the Raspbian image file you downloaded.
- Select the drive of your SD card in the ‘Device’ dropdown. Make sure you chose the correct one. Otherwise, you risk damaging the data on your hard drive.
- Select ‘Write’ and wait for the process to finish. That’s it!
- Now you can plug the SD card into your Raspberry Pi’s slot.
Put your microSD card into your card reader (and connect it to your Mac if your using an external reader). For this to work, your microSD should be empty and formatted in FAT32.
Go to your applications and open up Disk Utility (or just use Spotlight). Now we need to find the microSD card’s so called BSD number which looks like “diskn” where “n” is a number. To find it, select it (left side) and click on ‘Verify Disk’. Now, have a closer look at the appearing lines of text. There should be a line very similar to “/dev/rdisk1s1”. In this example, the BSD number would be “disk1”. With your microSD card still selected, click on ‘Unmount’ in the top menu bar of Disk Utility.
Now all you need to do is open up Terminal (in your Mac’s applications) and run the following line:
sudo dd bs=1m if=path_of_your_image.img of=/dev/diskn
Make sure to replace “n” from diskn with the right BSD number. Also, you need to include the complete path of your Raspbian image file. An easy way to find a file’s exact location is to drag and drop the file into the Terminal window.
So an example could look like that:
sudo dd bs=1m if=/Users/marc/Desktop/2014-12-24-wheezy-raspbian.img
After hitting Enter, you’ll be prompted to enter your system password (the one you use to log into your computer). Now, the image file is being transfered and installed on your microSD card. This can take a while. During the process you won’t see any feedback in your Terminal window so be patient until you see many new lines confirming a successful image transfer.
Note: Raspbian is not affiliated with the Raspberry Pi Foundation. Raspbian was created by a small, dedicated team of developers that are fans of the Raspberry Pi hardware, the educational goals of the Raspberry Pi Foundation and, of course, the Debian Project.
Note: the Raspbian with PIXEL image contained in the ZIP archive is over 4GB in size and uses the ZIP64 format. To uncompress the archive, a unzip tool that supports ZIP64 is required.
If your Pi has network connectivity you can remotely log in to it on your network allowing you to use your desktop or laptop to have direct terminal access allowing you to modify the operating system, install applications and update software same as if you were sitting at the Pi’s keyboard.
By default SSH is turned off in Raspbian. You can enable it by simply going to the preferences menu and selecting Raspberry Pi Configuration and clicking on the interfaces tab and selecting SSH Enabled.
Now you need to know the IP address of the Pi on your network. There are several ways to do this. You can log in to your router and access it there, or you can open the terminal on the Pi and enter
ifconfig. Keep in mind the IP address will change over time making it necessary to update to the current address.
Once you have the Pi’s IP address you need an application to connect to it. For that I recommend a program called Putty.
You can download Putty here
Once you have Putty installed simply enter the IP address using port 22, click open to open the connection.
Once the terminal window opens you will be greeted with the login window.
You will need to enter your username and password. The default username is ‘pi’ and the default password is ‘raspberry’. For security reasons you should change the default SSH password. The OS will warn you of using the default password if it’s not changed also.
Once logged in, you will be greeted with the terminal same as if you were sitting in front of the Pi.
Enabling and logging in as root via SSH
By default the root account login is turned off. You need to perform two tasks to enable it.
The first is you need to give the root account a password using the following command.
sudo passwd root
Then you need to enable logging in via SSH using the root account
sudo nano /etc/ssh/sshd_config
Turning the display backlight off and on
echo 0 > /sys/class/backlight/rpi_backlight/bl_power
echo 1 > /sys/class/backlight/rpi_backlight/bl_power
Dimming the Display
These commands only work on the version 1.1, version 1.0 values <128 is off and >128 is on.
echo n > /sys/class/backlight/rpi_backlight/brightness
N represents values between 0 and 255