January 14, 2015

Want to learn Linux? Try playing with a Raspberry Pi.

I’ve been playing with a Raspberry Pi (RPi) for some time now but haven’t made much headway until recently. I originally thought it would be a fun little device for mundane tasks like web browsing or simple coding. What I learned, however, is that it has some serious limitations so aspiring to be a simplified desktop environment is really asking too much.

I now appreciate that the RPi is a great way to learn Linux and develop simple circuits paired with scripted logic. The RPi makes this attractive by giving you the freedom to hack anything without fear you’ll do damage to the computer. If something runs amok, with a few keystrokes you can wipe out the memory, operating system and all, and just start over. Sure, you can do all that with your PC or Mac but the reinitialization is far more time consuming.

If you want to get your own RPi up and running quickly, here are a few resources that I found helpful for a fresh install. Beyond a keyboard and mouse, you’ll also need a WiFi USB dongle.

  • Start by formatting your SD card with SDFormatter.
  • Download the latest Raspbian image.
  • Flash the uncompressed image onto your SD card. This is surprisingly more complex than merely moving the image from your computer to the card itself. Well-written instructions are available from Adafruit for both Mac and PC.
  • Insert the SD card into your RPi and boot (i.e., plug in the power!).
  • On your initial boot, the raspi-config tool will open. This is the best time to modify configurations that will make your life easier. Overall instructions are listed here but the highlights are as follows:
    • Expand root partition to fill SD card.
    • Open the “internationalisation options” submenu.
    • Change your locale. Use the spacebar to turn off/on locales. For the US, turn off GB (en_GB.UTF-8 UTF-8) and turn off US (en_US.UTF-8 UTF-8).
    • Change your timezone.
    • Change your keyboard. This is a very important step. Unless you change these setting, your keys may be incorrectly mapped and cause you an amazing amount of frustration!
    • Reboot the RPi upon exit.
  • Connect the RPi to your wireless network by editing wpa_supplicant configuration file.
  • Now that you have a wireless internet connection, update and upgrade Raspbian.