
Merry 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.
raspberrypi.local
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”
Comments are closed.
A nice “Good morning!” to new Pi owners on Christmas Day!
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.
Example:
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! :)
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.
I appreciate the feedback. I probably should have made the headline clearer. Another post is in order with more Raspberry Pi specific tips.
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.
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. :)
[…] Ten Tips for New Raspberry Pi Owners [Make] […]
[…] even meaning to, I tripped over a useful blog post by Matt Richardson – 10 Tips for New Raspberry Pi Owners. To enable local DNS-style naming of my RPi (raspberrypi.local), I needed to install the Avahi […]
[…] upcoming Getting Started with Raspberry Pi book (that we’ve been loving at Adafruit), from MAKE. (Read all ten tips […]
[…] o TightVNC – http://www.penguintutor.com/linux/tightvnc 10 dicas para usar o Raspberry Pi – http://blog.makezine.com/2012/12/25/ten-raspberry-pi-tips/ Raspbian “wheezy” – http://www.raspberrypi.org/downloads RASPBMC – http://www.raspbmc.com/ […]
[…] upcoming Getting Started with Raspberry Pi book (that we’ve been loving at Adafruit), from MAKE. (Read all ten tips […]
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.
Steve
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
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.
What network adapter are you using? I recommend the Edimax 7811Un for the Raspberry Pi. Click on my name to have a look at my store.
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)
Some of us are new to both Linux and Raspberry Pi so this does a lot for someone like me!
Here’s a tip for all you new Raspberry Pi owners that want to monitor the status of your Raspberry Pi:
Install Pimon (instructions at http://pimon.pedrocarrico.net/)
Pimon is a simple server monitor designed for the Raspberry Pi, you can see it in action on my own Raspberry Pi at http://pec.no-ip.biz/
[…] More from Christina Martin: craft / DIY garden animals fashion Sort Share blog.makezine.com 4 minutes […]
[…] MAKE | Ten Tips for New Raspberry Pi Owners […]
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.
[…] Ten Tips for New Raspberry Pi Owners (makezine.com) […]
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?
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.
Turns out you also have to install Netatalk, THEN advertise its availability with Avahi.
Good day! This is my first visit to your blog!
We are a group of volunteers and starting a new initiative in a community
in the same niche. Your blog provided us valuable information to work on.
You have done a extraordinary job!
Google
Below youll obtain the link to some web pages that we consider it is best to visit.
分享屋
[…]below you will discover the link to some web sites that we believe you need to visit[…]
4 seasons home improvement
[…]always a massive fan of linking to bloggers that I really like but do not get lots of link love from[…]
Die Casting Mold Inserts
[…]one of our guests a short while ago encouraged the following website[…]
Legacy Food Storage Products
[…]check below, are some absolutely unrelated web-sites to ours, even so, they may be most trustworthy sources that we use[…]
read more
[…]here are some hyperlinks to web sites that we link to simply because we assume they’re worth visiting[…]
click here
[…]the time to study or visit the subject material or web-sites we’ve linked to beneath the[…]
paintless dent repair training
[…]below you will uncover the link to some web pages that we think you must visit[…]
حبوب الاجهاض للبيع
[…]although sites we backlink to beneath are considerably not associated to ours, we really feel they are basically really worth a go by means of, so have a look[…]
paintless dent repair training by SAI
[…]that will be the finish of this article. Right here youll discover some web sites that we think youll value, just click the hyperlinks over[…]
working from home jobs
[…]just beneath, are many totally not related web pages to ours, on the other hand, they’re surely worth going over[…]
Resell Rights Ebooks
[…]Wonderful story, reckoned we could combine a number of unrelated information, nevertheless actually worth taking a look, whoa did a single find out about Mid East has got a lot more problerms at the same time […]
arabica coffee beans
[…]Wonderful story, reckoned we could combine a few unrelated information, nevertheless seriously really worth taking a look, whoa did a single understand about Mid East has got much more problerms too […]
threaded glass jar
[…]always a massive fan of linking to bloggers that I like but do not get a lot of link love from[…]
Aktfotos
[…]Here is a superb Weblog You might Come across Fascinating that we Encourage You[…]
kktc üniversite
[…]one of our visitors recently encouraged the following website[…]
tabletki na włosy
[…]very handful of web-sites that occur to become in depth below, from our point of view are undoubtedly effectively worth checking out[…]
auriculoterapia ansiedad
[…]Wonderful story, reckoned we could combine some unrelated information, nonetheless truly really worth taking a look, whoa did one study about Mid East has got more problerms at the same time […]
http://www.entretien-menager-genial.ca/femme-de-menage-montreal.html
[…]although websites we backlink to beneath are considerably not related to ours, we really feel they may be essentially really worth a go through, so possess a look[…]
Phone case
[…]Wonderful story, reckoned we could combine a handful of unrelated data, nevertheless seriously really worth taking a search, whoa did a single study about Mid East has got additional problerms also […]
ηλιακά συστήματα
[…]one of our guests lately advised the following website[…]
medjool dates for sale
[…]Here is a good Weblog You might Locate Exciting that we Encourage You[…]
http://www.menage-poly.com
[…]Here is a great Blog You might Discover Interesting that we Encourage You[…]
paintless dent repair
[…]very couple of web sites that transpire to be comprehensive below, from our point of view are undoubtedly well really worth checking out[…]
Shoe cleaner
[…]that could be the finish of this article. Here youll find some web-sites that we feel you will value, just click the hyperlinks over[…]
window cleaners perth
[…]Here is a good Blog You may Obtain Exciting that we Encourage You[…]
mining western australia
[…]Here are some of the web pages we advocate for our visitors[…]
locksmith services
[…]one of our guests recently encouraged the following website[…]
k7x
[…]Wonderful story, reckoned we could combine some unrelated information, nevertheless genuinely really worth taking a appear, whoa did 1 master about Mid East has got extra problerms as well […]
how to win the lottery book
[…]below you will discover the link to some websites that we think you should visit[…]
The Slave of the Husband
Trying to find ahead to studying more from you afterward!…
advertise your guitar
[…]the time to read or take a look at the material or internet sites we have linked to beneath the[…]
more
[…]we came across a cool site which you could possibly get pleasure from. Take a search when you want[…]
friv
[…]that will be the end of this report. Here you will locate some web sites that we feel youll appreciate, just click the links over[…]
pool fencing options
[…]that could be the finish of this article. Here you will uncover some sites that we believe youll appreciate, just click the hyperlinks over[…]
vw servicing
[…]although websites we backlink to beneath are considerably not related to ours, we really feel they may be truly really worth a go as a result of, so have a look[…]
Woman of Alien
Great work you have finished, this great site is de facto interesting with wonderful data. Time is God’s way of preserving every thing from occurring at the same time.
frame picture
[…]Here are several of the web pages we suggest for our visitors[…]
Whispering Misty
So sorry you can pass up the workshop!
Thorn of Girl
Excellent information and facts may be identified on this web web site.
paintless dent repairs
[…]Here are a few of the web-sites we advocate for our visitors[…]
Healing’s Dragon
to seek out troubles to boost my site!I suppose its ok to create usage of some of your principles!!
event videographer
[…]Here is a good Weblog You may Find Intriguing that we Encourage You[…]
Robert Shumake develoment
[…]we came across a cool internet site that you just might take pleasure in. Take a search for those who want[…]
superior auto institute review
[…]here are some hyperlinks to web-sites that we link to because we assume they’re worth visiting[…]
Third Flower
My wife and i are already now delighted that Albert could perform his reports due to the concepts he had by means of your web content. It’s once in a while perplexing to just normally be giving away techniques which lots of people might have been offe…
superior auto institute reviews
[…]very few web sites that happen to become detailed below, from our point of view are undoubtedly properly worth checking out[…]
https://www.youtube.com/watch?v=_kQUpnbslok
[…]the time to study or pay a visit to the content material or websites we’ve linked to below the[…]
contract hire and leasing
[…]although websites we backlink to below are considerably not associated to ours, we feel they may be essentially worth a go via, so have a look[…]
minecraft gratuit
[…]check below, are some completely unrelated internet sites to ours, having said that, they may be most trustworthy sources that we use[…]
http://www.legacyfoodstorage.com
[…]Wonderful story, reckoned we could combine a few unrelated information, nonetheless really worth taking a appear, whoa did one master about Mid East has got additional problerms as well […]
click here
[…]one of our visitors not long ago recommended the following website[…]
best testosterone booster
[…]below youll discover the link to some web pages that we believe you’ll want to visit[…]
GNA
[…]that will be the end of this report. Right here youll locate some websites that we believe youll enjoy, just click the links over[…]
best car shipping quote
[…]Every once in a although we select blogs that we study. Listed below would be the newest internet sites that we choose […]
legit work from home jobs
[…]Here are a number of the web pages we recommend for our visitors[…]
love
[…]check below, are some totally unrelated internet sites to ours, nonetheless, they’re most trustworthy sources that we use[…]
used mobile phones lagos
[…]we like to honor lots of other world wide web web sites on the net, even though they arent linked to us, by linking to them. Underneath are some webpages worth checking out[…]
used mobile phones lagos
[…]check beneath, are some absolutely unrelated websites to ours, however, they are most trustworthy sources that we use[…]
The Slave of the Husband
Trying to get ahead to researching extra from you afterward!…
used mobile phones lagos
[…]one of our visitors a short while ago proposed the following website[…]
mobile phones lagos
[…]usually posts some incredibly fascinating stuff like this. If you are new to this site[…]
ways to make money at home
[…]just beneath, are several absolutely not related web sites to ours, having said that, they’re certainly worth going over[…]
Online sale
[…]the time to read or stop by the content material or sites we’ve linked to beneath the[…]
Arvind Pandit
[…]Wonderful story, reckoned we could combine several unrelated data, nonetheless truly worth taking a search, whoa did a single learn about Mid East has got a lot more problerms also […]
entra
[…]that will be the finish of this write-up. Here you will locate some web pages that we think youll enjoy, just click the hyperlinks over[…]
buy soundcloud plays
[…]very couple of internet websites that take place to become comprehensive beneath, from our point of view are undoubtedly properly really worth checking out[…]
Real Estate Agent
[…]here are some links to web sites that we link to for the reason that we believe they’re really worth visiting[…]
Maryland Real Estate
[…]always a major fan of linking to bloggers that I adore but really don’t get a great deal of link really like from[…]
Split Level
[…]Wonderful story, reckoned we could combine several unrelated information, nevertheless definitely worth taking a appear, whoa did 1 learn about Mid East has got far more problerms also […]
web design company
[…]below youll come across the link to some web-sites that we assume you should visit[…]
Easy access to sites, websites, web pages and more.
[…]just beneath, are several completely not connected web-sites to ours, on the other hand, they may be surely worth going over[…]
domy w stylu tradycyjnym
[…]Wonderful story, reckoned we could combine a couple of unrelated data, nonetheless actually worth taking a search, whoa did a single find out about Mid East has got additional problerms as well […]
sheds
[…]always a big fan of linking to bloggers that I love but do not get a whole lot of link enjoy from[…]
allrecipes
[…]just beneath, are several entirely not associated sites to ours, however, they’re certainly really worth going over[…]
breitling
[…]very handful of sites that occur to become comprehensive beneath, from our point of view are undoubtedly nicely really worth checking out[…]
Home additions
[…]we like to honor a lot of other internet web sites around the net, even though they arent linked to us, by linking to them. Beneath are some webpages worth checking out[…]
Recording Studio
[…]Wonderful story, reckoned we could combine a couple of unrelated information, nevertheless seriously worth taking a appear, whoa did one particular study about Mid East has got more problerms at the same time […]
electrodos puesta a tierra
[…]The information talked about in the post are a number of the most beneficial readily available […]
phone system removal
[…]please stop by the internet sites we follow, including this a single, as it represents our picks through the web[…]
Free Mobile Group Chat
[…]the time to study or stop by the content or web pages we’ve linked to below the[…]
Strippers Las Vegas
[…]always a major fan of linking to bloggers that I adore but do not get lots of link enjoy from[…]