How to Set Up a Raspberry Pi in Linux
Pinterest Stumbleupon Whatsapp
Advertisement

It can be used as a media center Install Kodi to Turn Your Raspberry Pi Into a Home Media Center Install Kodi to Turn Your Raspberry Pi Into a Home Media Center You need a media center solution, and you've heard about Kodi. Is it suitable, and can you install it on your Raspberry Pi? And how do you take it beyond the basics? Read More , the brain of a robot, as a web server, even a digital picture frame ShowerThoughts and EarthPorn: Make an Inspiring Raspberry Pi Photo Frame ShowerThoughts and EarthPorn: Make an Inspiring Raspberry Pi Photo Frame Read More . 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 Getting Started With Raspberry Pi On The Mac Getting Started With Raspberry Pi On The Mac Apple users can get in on the Raspberry Pi game pretty easily, but there are a few different ways to image a microSD card using your Mac. Read More , 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.

linux setup raspberry pi

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.

linux raspberry pi setup format

Next, you need to format the partition:

sudo mkfs.vfat /dev/mmcblk0p1

Ensure you use the name of the partition, rather than the device.

Download NOOBS

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:

  1. Raspbian
  2. Pidora
  3. RISC OS
  4. Arch Linux
  5. OSMC

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:

cd /media/[serial]

All you need to do now is, unzip the NOOBS download:

unzip /home/[your_username]/Downloads/RaspberryPi/distros/NOOBS_v1_3_11.zip

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.

linux raspberry pi setup noobs

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 10 Operating Systems You Can Run With Raspberry Pi 10 Operating Systems You Can Run With Raspberry Pi The hardware of the Raspberry Pi alone is only one side of the story: Today I explore 10 different Operating Systems you can install. Read More — 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.

linux raspberry pi setup etcher config

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 Retro Gaming in Style With RecalBox for the Raspberry Pi Retro Gaming in Style With RecalBox for the Raspberry Pi RecalBox brings together classic emulators with a fantastic unified user interface that makes choosing games and configuring your controllers easy. Read More for retro gaming, Ubuntu MATE How to Get Ubuntu Running on Your Raspberry Pi How to Get Ubuntu Running on Your Raspberry Pi Raspbian Jessie is a great Raspberry Pi operating system. But what if you want a more traditional Linux experience? Well, you could go ahead and install Ubuntu instead. Read More , 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.

linux raspberry pi setup etcher

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.

linux raspberry pi setup etcher complete

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 How to Easily Clone and Restore a Linux Disk Image With dd How to Easily Clone and Restore a Linux Disk Image With dd If you want to wipe, backup, or restore data on Linux, there are a number of apps you can pick. But whichever Linux operating system you run, there's one command that always works -- dd. Read More 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

Leave a Reply

Your email address will not be published. Required fields are marked *