Raspberry Pi
Ten Tips for New Raspberry Pi Owners

coverMerry Christmas, makers! We’re guessing a lot of you found Raspberry Pis under the tree this morning and are eager to start hacking around with it. Getting Started with Raspberry Pi, which I co-authored with Shawn Wallace, will be shipping very soon and is available for pre-order now. In the meantime, we’ve compiled a list of a few of our favorite quick tips that may come in handy as you explore the platform.

Some of these might be old hat to experienced Linux users, but who knows, you might also learn something new. And if you have any favorite Raspberry Pi tips that you’d like to add, we want to hear them! Please share them in the comments below.

Command line completion
You don’t have to laboriously type out long paths, filenames, and commands. Just type the first few letters and hit tab. If bash (the command interpreter, or shell) can determine what file you’re referring to, it will fill in the rest for you. If not, hit tab again it will give you a list of possibilities if there are more than one.

Command history
Bash also keeps a history of the commands you type. When at the command prompt, hit the up key to cycle through your most recent commands. Hit enter to execute the one you want.

Jumping to the beginning or end of a command
If you want to jump to the beginning of a command you’ve typed (for instance, if you’ve miskeyed something), type Control-A. To jump to the end of the line, type Control-E

Switch screens with ALT+[F1 though F6] keys
When you’re not in the graphical desktop environment, you can still multitask. Switch between terminal screens by pressing the ALT key along with F1 through F6.

sudo !!
It can be frustrating to type out an entire command only to be told you need to be the superuser to execute it. Type “sudo !!” (pronounced “sudo bang bang”) to execute the previous command as root.

Taking screenshots
Install scrot (by executing “sudo apt-get install scrot”) so that you can take screenshots within the graphical desktop environment. After it’s installed, execute the command scrot in a terminal window to save a PNG of the desktop to the working directory. Scrot is also highly configurable; execute “scrot -h” to see all the options available to you.

Log in remotely
If you want to access your Raspberry Pi’s command line from another computer, type sudo raspi-config at the prompt and choose the option to enable SSH. Then type ifconfig to get your Raspberry Pi’s IP. On a OS X or Linux computer, type ssh pi@[ip address] to connect to your Pi. On Windows, use PuTTY.

Use your computer’s internet connection
If you don’t have a convenient ethernet connection nearby or a USB Wifi adapter handy, you can also use your computer’s Wifi internet connection and share it via Ethernet to the Raspberry Pi. Here are guides to do on various operating systems: Mac OS, Windows, or Linux (Ubuntu).

One line Python web server
If you’d like to create a web server with just one command, simply execute “python -m SimpleHTTPServer”. The files in the current working directory will be accessible via your Pi’s IP address. Add an index.html file if you’d like to serve that page, otherwise, a file directory will be displayed. In Getting Started with Raspberry Pi, we show you how to set up a more advanced, dynamic web server that can even read sensors or control things in the real world.

If you have trouble remembering the IP address of your Raspberry Pi when you want to access it over the network, install avahi with the command “sudo apt-get install avahi-daemon” and you’ll be able to use raspberrypi.local instead of the IP address. If you’re accessing the Raspberry Pi from a Windows machine, you may need to install Bonjour Services on it for this to work.

There are plenty more tips like these in Getting Started with Raspberry Pi, which will start shipping any day now. The ebook is available for download now in the O’Reilly shop (DRM-free), on Amazon, and in the iBook store.

108 thoughts on “Ten Tips for New Raspberry Pi Owners

  1. Screen Multitask Remotely
    Somewhat related to number 4 & 7. When you are logged in remotely and want to multicast, you can always use screen (http://kb.iu.edu/data/acuy.html).
    1. Use ‘sudo apt-get install screen’ to get the program.
    2. Start the program with ‘screen’.
    3. Then use ‘Ctrl-a’ to enter the ‘command mode’ to enter screen-related commands.


    1. Type ‘sudo apt-get install screen’ (I cant remember if the program was install by default or not)
    2. Type ‘screen’
    3. On current screen: (optional) Type ‘top’ to have something display on the screen.
    4. Create a new screen with: Ctrl-A, then type ‘C’
    5. Now you are on second screen. Type anything you want, such as ‘pwd, ‘ls’.
    6. To get back to the first screen: Ctrl-A, then type ‘1’. You are now back at the output of ‘top’!
    7. Type ‘q’ to get out of the ‘top’ output. If you type exit at this point, you will terminate screen 1 and go to screen 2.

    Wow, a lot of words to illustrate something really simple. But once you use it once or twice, it will be second nature to you. Enjoy! :)

  2. Sorry to sound critical.. but this has less to do with Raspberry Pi and more to do with Linux.

    As a linux non-noob but Raspi noob, I am quite disappointed in this guide, since there’s maybe one item that’s specific to the Raspi, and only barely.

    1. I appreciate the feedback. I probably should have made the headline clearer. Another post is in order with more Raspberry Pi specific tips.

    2. I too arrived for an article that was hopefully pointing to some basic maker projects ; possibly accessing the GPIO or advice on the best power supplies or avoiding power drain on USB; something about how some SD Cards are a pain in the ass to get working with the PI and why sometimes it wont boot. Instead I found a simple bash shell scripting article; sure you can wrap it up and suggest that new raspberry pi owners might want to know about Linux but a headline to that effect would be good; meanwhile lets hear about power, sd cards, GPIO, Ethernet related projects, XMBC . stuff to started.

    3. Hi, I was in the same boat a few weeks back, receiving my RasPi for the first time and wonder about SOC, GPIO, Ethernet, etc. I find the book, Raspberry Pi User Guide (http://www.amazon.com/Raspberry-User-Guide-Gareth-Halfacree/dp/111846446X/ref=sr_1_1?s=books&ie=UTF8&qid=1356540810&sr=1-1&keywords=raspberry+pi) answered all of the questions for me. Written by the co-founder of Raspberry Pi Foundation, it does cover some Linux basics but also lots of hardware hacks. I solder for the first time and got the GPIO LED working in about 30 minutes after reading the chapter. :)

  3. My desktop connects wirelessly to my router. The RPi needs to live next to the desktop. The Wifi Dongle I use with the RPi gives a very poor connection so the “Use your computer’s internet connection” above seems ideal.

    I’ve shared the connection and plugged the RPi into the desktop via a network cable.

    Windows 7 recognises this as an active network describing it as “Unidentified network, Public network” . If I power the RPi down and up again the network from the active network list and reappears after it is identified. So something is working.

    But I’m a bit stuck as to what to do next to get an internet connection on the RPi. I’m guessing I need to open a connection to the RPi, but I don’t know what I’m doing. Any help would be greatly received.


    1. Don’t use connection sharing, use Windows 7 feature Network Bridge:
      Open the Windows Network and Sharing Center (right-click network icon in taskbar). Click Change adapter settings (from sidebar menu). Hold CTRL to select your wireless adapter (connected to the router) and the ethernet adapter (connected to the Pi) then right-click either one and pick Bridge Connections from the context menu. Now the Pi will be assigned a DHCP address by the router and be able to access the internet. This also works when authorisation is required for the wireless network, as long as the desktop is authenticated. Note that you might have to sudo ifup eth0 on the Pi or reboot.
      Good luck and enjoy your Pi

      1. Or use Linux instead of Windows and properly enable packet routing to your pi – quagga is a rich routing package for Linux. AFter all, that’s what the pi is for: messing with things you don’t know about.

  4. I am somewhat disappointed – none of these is RPi tip, but just very basic bash/linux intro. Search linux, and you will find out much much more such tips.

    Also to switch to other virtual console when in graphics mode use Ctrl+Alt+F1 .. F9, switching back to graphics with Alt+F7 (On some distros it may be Alt+F1)

  5. Nice article! If you create a new user on a Raspberry Pi running Ubuntu or Raspian, the default shell will not support things like command completion using the tab key. You can fix this by changing your shell:

    chsh -s /bin/bash

    You may want to copy things like .profile and .bashrc from the default user’s account.

    cp ~pi/.profile ~
    cp ~pi/.bashrc ~

    ~pi is the user named “pi’s” directory.
    ~ is your user directory

    I mention this because I spent a half hour wondering why command completion wasn’t working.

  6. Using terminal on OSX to ssh into raspi. What is the shortcut to terminate a running python programm (sudo python test.py) ? ctrl-c, ctrl-break, ctrl-z do not work on my computer?

  7. That Avahi part is flat-out wrong. You can’t just install avahi-daemon and then access your Pi over the network by name. You also have to set up a service description file under /etc/avahi/services. And even then I’ve yet to see it work.

  8. Pingback: Google
  9. Pingback: 分享屋
  10. Pingback: read more
  11. Pingback: click here
  12. Pingback: threaded glass jar
  13. Pingback: Aktfotos
  14. Pingback: kktc üniversite
  15. Pingback: tabletki na włosy
  16. Pingback: Phone case
  17. Pingback: Shoe cleaner
  18. Pingback: locksmith services
  19. Pingback: k7x
  20. Pingback: Blue Coaster33
  21. Pingback: more
  22. Pingback: friv
  23. Pingback: vw servicing
  24. Pingback: frame picture
  25. Pingback: alkaline water
  26. Pingback: event videographer
  27. Pingback: alkaline water
  28. Pingback: minecraft gratuit
  29. Pingback: click here
  30. Pingback: GNA
  31. Pingback: love
  32. Pingback: Online sale
  33. Pingback: Arvind Pandit
  34. Pingback: entra
  35. Pingback: Real Estate Agent
  36. Pingback: Split Level
  37. Pingback: web design company
  38. Pingback: sheds
  39. Pingback: allrecipes
  40. Pingback: breitling
  41. Pingback: Home additions
  42. Pingback: Recording Studio

Comments are closed.

Matt Richardson is a San Francisco-based creative technologist and Contributing Editor at MAKE. He’s the co-author of Getting Started with Raspberry Pi and the author of Getting Started with BeagleBone.

View more articles by Matt Richardson