It can be used as a media center, the brain of a robot, as a web server, even a digital picture frame. The little Raspberry Pi appears to know very few limits… you can even run old Windows games on it without emulation!
Setting up a Raspberry Pi opens a gateway to an exciting world of compact, portable computing. It seems like almost all of the instructions online are for Windows computers, however, if you’re running Linux, you may not know how to successfully set up your Raspberry Pi.
We’ve already addressed this problem for Apple macOS users, so now it’s the turn of Linux. Here’s how to swiftly and easily set up a Raspberry Pi using your Linux computer.
The Easy Way: Use NOOBS
Released in 2013, NOOBS (New Out Of Box Software) is a useful installation interface that gives you the chance to select from multiple Raspberry Pi operating systems. One or more of these can then be installed, depending on how much space you have on your microSD card. Ensure your card is at least 4 GB. Because it will need to be formatted first, before inserting, list any mounted devices with:
sudo fdisk -l
Now, insert the card and run the command again. The new entry is your microSD card. Typically, the card will be labeled mmcblk0. However, if it has been partitioned, the name will be appended with p1, such as mmcblk0p1.
Next, run fdisk:
sudo fdisk /dev/mmcblk0
Delete any partitions on that drive with d, inputting the partition number when prompted. When done, follow this with n to create a new partition, then p to confirm the details of the partition.
At this stage, the partition type will be set to Linux, but NOOBS requires FAT32. To set FAT32, tap t, select the partition number, and then the partition type (W95 FAT32). Confirm the details again with p. Finally, hit w to write the partition table.
Next, you need to format the partition:
sudo mkfs.vfat /dev/mmcblk0p1
Ensure you use the name of the partition, rather than the device.
You can download NOOBS from www.raspberrypi.org/downloads. Save this to a location on your PC where you can easily find it.
The downloaded ZIP comes in two sizes: a full version for offline installation, and a lite option which requires an internet connection for your Pi. This is achieved via Ethernet cable (Wi-Fi will be available once the operating system is installed).
Included in NOOBS are:
- RISC OS
- Arch Linux
At times, additional Linux versions are added to the list.
Copying the NOOBS software to the microSD card will require you to first mount the card, with:
mount | grep -i mmcblk0p1
When this is done, the internal serial number of the media device should be displayed. Use this to change directory:
All you need to do now is, unzip the NOOBS download:
Wait while this command unzips the NOOBS data into the microSD card. Once complete, you’ll need to safely unmount the card to eject it:
cd sudo umount /dev/mmcblk0p1
With the card removed, you’re ready to insert it into a powered-down Raspberry Pi. With the power cable connected (along with a mouse and/or keyboard and a HDMI display) you’ll be ready to select your preferred operating system(s), and let NOOBS finish things off.
Note that if you opted to install multiple operating systems, when you boot your Raspberry Pi, a menu will be displayed for you to choose which one you want to use.
Install an Operating System Image
Your other option is to download an operating system — typically Raspbian Jessie, but many alternatives are available — and write this to the microSD card.
The best way to do this is with a third party application. Several are available for writing disk images, such as Etcher, which you’ll find in your package manager.
Once you’ve done that, it’s time to choose your Raspberry Pi operating system. As noted, several are available. The preferred option is Raspbian Jessie (also available from www.raspberrypi.org/downloads), but you might just as easily install RecalBox for retro gaming, Ubuntu MATE, or any other compatible operating system you can find.
Download the image file (which should have the .IMG suffix) to a memorable place on your Linux computer (the Downloads folder in the Home directory is always good) and if necessary, unpackage any compression. What you should end up with is a file along the lines of raspberrypi_operatingsystem.img.
Next, run Etcher, and browse for and select the IMG file in the Select image box. Note that you can hover the mouse over the filename after you’ve done this to check the right file is selected. You can even click the pop-up to read the full file path.
Next, ensure that the correct drive is selected. Mouse over the drive icon to confirm the name, and if you need to amend it, click Change. Any other external storage connected to your computer will be listed here. Make sure the microSD card is selected.
Click Flash to begin writing the IMG file to the microSD card. Once this is done, your Raspberry Pi operating system will be ready to use. Safely eject the card, and insert it into your switched off Pi. Connect the power to boot up and enjoy!
Set Up Your Raspberry Pi in Linux With Ease!
It really is that easy. If you’re installing a standard operating system IMG file, all you need is an image-to-SD-card writing app such as Image Writer. While using the dd command in the terminal is an option, it’s not suitable for beginners.
If you want a choice of operating systems curated by the Raspberry Pi team that is easy to install, then NOOBS should be your option.
In short, setting up a Raspberry Pi with Linux is just as simple as it is in Windows or macOS!
Which option did you use? Do you use NOOBS on your Raspberry Pi, or do you prefer a single operating system on your microSD card? Did you run into any problems? Let us know in the comments.
Image Credit: Bygetvitamin via Shutterstock.com