HomeBlogSitemapContact Me

Raspberry Pi Beginners Guide

PLEASE NOTE: This guide is now obsolete. See The Updated Raspberry Pi Guide for the latest and greatest guide.

This guide is aimed at helping newcomers to the the Raspberry Pi (or Linux in general) get up and running with their fantastic new toy and move on to the fun stuff.

I'm going to assume you have the Model B (although most of this will work for Model A too - with the exception of the VNC setup) and some form of Windows.

We'll be installing the Raspbian "wheezy" Debian Linux distribution for Raspberry Pi. If your using the old "squeeze" distro then upgrade now! The Raspbian "wheezy" distribution is much faster.

What you need

You'll need the following bits and pieces:

* The TV/Monitor, Keyboard and Mouse are semi-optional. If you have the Model B Raspberry Pi we can remote desktop into the Pi from any Windows or Linux pc/laptop connected to the network. We'll just need the TV keyboard etc to do the initial setup.

Installing Linux on your SD Card

We'll be using the Debian Raspbian "wheezy" Linux distribution here as it comes with a lot of examples and apps right out the box. Head over to the Raspberry Pi Downloads section to grab it.

You'll also need Win32 Disk Imager to write the downloaded image. Make sure you click on the right download and not one of the annoying ads made to look like the download (you should always stay on http://www.softpedia.com).

Note: if you need to reuse the SD Card in Windows again you may find it can't be read or shows a very small capacity. If so you need to re-write the file system. I found the easiest way was to put the card into a digital camera and format from there. You should now be able to read the card in Windows.

Running the Raspberry Pi Desktop

Right, now we're getting somewhere. Make sure the SD card is inserted and the Pi is connected to the TV.

Now connect the power. You should see the Pi kick into life. Don't worry if you see some errors here, let it finish and you'll get to a login prompt.

If you are having trouble booting, take a look at the above section on compatible SD cards again.

The default username and password are:

Username: pi
Password: raspberry

When you hit the command prompt enter the following to launch the desktop:

startx

Congratulations! You now have a fully working desktop environment on £20 computer!

Updating and Upgrading Debian Raspbian "wheezy" Linux Distribution

Before you begin to install any software it's best to make sure the package index files are up-to-date (essentially just a file pointing to the latest version of compatible software - for example when we install VNC later in the guide). Make sure you have an internet connection and run the following command. It may take a few minutes.

sudo apt-get update

Followed by:

sudo apt-get upgrade

Now's also a good time to make sure the who Linux distribution is up-to-date. You can do this now, or later (it may take a while). Again make sure you have an internet connection and run:

sudo apt-get dist-upgrade

You can run these commands every now and again to make sure you have the latest software. If you're asked to confirm anything, just hit 'y' on the keyboard.

Installing VNC on the Raspberry Pi for Remote Access

You may find it a bit cumbersome having a keyboard and mouse connected to the Raspberry Pi. What's the point in having a computer smaller than your TV remote if you need to connect a massive Keyboard?

Installing VNC will allow for remote access via laptop etc while the Pi remains hidden away behind the TV or next to the router.

Giving the Pi a Static IP Address

So we always know where the Pi is let's give it a static IP address. if you're not sure what your local network range is open a command prompt from a Windows PC.

Start > Run and enter:

cmd

Now type:

ipconfig

You should see something like:

IPv4 Address. . . . . . . . . . . : 192.168.1.137
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

We give the Pi the same details excluding the last 3 digits of the IPv4 Address. Let's make it easy to remember:

192.168.1.150

Back in the Raspberry Pi goto the command prompt again, don't start the desktop.

Type:

sudo nano /etc/network/interfaces

This will bring up the network interface configuration file in the nano text editor. The word sudo simply runs this command with super user privileges.

You can save yourself a lot of time at the Linux command prompt by using Tab to auto complete.

You should see:

iface lo inet loopback
iface eth0 inet dhcp

Change this to (your IP details maybe different depending what you got from ipconfig):

iface lo inet loopback
iface eth0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1

Use Ctrl X to exit. Hit Y when prompted to save.

Now restart the network interface to apply changes without a reboot:

sudo /etc/init.d/networking stop

Followed by (can you guess?):

sudo /etc/init.d/networking start

Now your Raspberry Pi will always have the same IP address. Try pinging it from the Windows command Prompt:

ping 192.168.1.150

Installing VNC on the Pi

We're going to use Tight VNC here (server on the Raspberry Pi and Viewer on Windows).

There's an excellent tutorial over at Penguin Tutor if you need more information.

First of all install the Tight VNC Server from the command prompt:

sudo apt-get install tightvncserver

Let it finish installing (if you're asked to confirm anything, just hit 'y' on the keyboard). When complete start the server:

vncserver

You'll be asked to create a password, enter one and confirm. I used raspberry for ease of use, but probably not the most secure!

When asked to create a view only password, say No.

Every time you start VNC you'll see something like:

New 'X' desktop is raspberrypi:1

Note the :1. This is the desktop session created. You can add more by running VNC again.

Head over to TightVNC on your windows box and install the viewer.

To connect run the VNC Viewer and enter:

192.168.1.150:1

Tight VNC Login

Where the IP address matches the one entered before and :1 matches desktop session.

When prompted enter the Password used when installing VNC Server.

The VNC Connected to Raspberry Pi

Start VNC Server Automatically on Bootup

There's no point in having VNC if you have goto to the Pi, login and start the server manually. So let's start it on bootup before the login prompt.

Create a new file in the init.d directory:

sudo nano /etc/init.d/tightvncserver

Enter the following details:

#!/bin/sh
# /etc/init.d/tightvncserver
VNCUSER='pi'
case "$1" in
    start)
        su $VNCUSER -c '/usr/bin/tightvncserver :1'
        echo "Starting TightVNC Server for $VNCUSER "
        ;;
    stop)
        pkill Xtightvnc
        echo "TightVNC Server stopped"
        ;;
    *)
        echo "Usage: /etc/init.d/tightvncserver {start|stop}"
        exit 1
        ;;
esac
exit 0

Give the script executable permission:

sudo chmod 755 /etc/init.d/tightvncserver

We can now start or stop the service manually:

sudo /etc/init.d/tightvncserver start
sudo /etc/init.d/tightvncserver stop

But let's make Tight VNC Server start every time the Raspberry Pi starts up:

sudo update-rc.d tightvncserver defaults

Now just power off the Raspberry Pi. Make sure it's connected to the network and power back on. You can now connected across the network using the VNC Viewer!

The Raspberry Pi Config Tool

The Raspberry Pi Configuration Tool (aka Raspi-config) is a very useful tool pre-packaged with the Raspbian "wheezy" distro. You'll probably see it during installation; but you can launching manually for the terminal with the following command:

sudo raspi-config

Raspi-config

I'd recommend running the following as soon as possible:

Useful Terminal Commands

Shutdown your Pi in 1 minute:

sudo shutdown -h 1

Reboot your pi in 1 minute:

sudo shutdown -r 1

Get manual for any command:

man [command]

e.g.

man shutdown

Enjoy!

Comments

Comments  

 
0 #260 Yong 2014-12-18 13:14
Ahaa, its pleasant dialogue on the topic of this piece of writing
here at this website, I have read all that, so now me also commenting at this place.



Also visit my homepage: web site (Yong: http://www.tonglou.com.cn/link.php?url=http://www.oraljelly.es)
Quote
 
 
+1 #259 Ulrike 2014-12-13 02:41
Have tthe party divide into gdoups of thrse or
four. According tto the Metyropolitan Polce in London, couhrt cases have risen from just 35 in 2003 to 719 in 2009.
When you use the laser, be sure not to shine
it in their eyes, because that could actually blin them (but I'm sure you knew that already ).
Quote
 
 
-1 #258 best distortion vst 2014-12-05 15:36
Howdy! This post could not be written any better! Reading through this post reminds
me of my previous room mate! He always kept talking about this.
I will forward this post to him. Fairly certain he will have a good
read. Many thanks for sharing!
Quote
 
 
-1 #257 good distortion 2014-12-05 02:47
Thank you, I've recently been looking for info about this subject for a long
time and yours is thhe bst Ihave came upon till now.
But, what about the conclusion? Are you certain concerning the source?
Quote
 
 
-1 #256 http://goseoservice. 2014-12-03 16:19
It is More Cost-Effective. If you're considering opting for other advertising methods
instead and jumping the SEO services, you should know that
search engine optimization can in fact be a lot more cost effective.
It alsonormally brings forth much better results, even though it mightappear as if it is a bit more expensive than other options initially.

It also lasts longer than things like pay per click marketing.
Therefore, you could spend less over time by opting for the right SEO
services instead of spending all of your advertising dollars on other promotion methods.
Quote
 
 
-1 #255 seofreelisting.com 2014-12-03 13:35
These Blunders Aren't Easily Forgiven Because
of recent changes that have been made by Google and its adversaries,
although it's Easy to Make Errors, certain things can cause your website to be
penalized or removed from the search engine listings totally.
For example,buildin g the incorrect backlinks or using key words too many times won't be met
positively. Not only will you not be ableto rate your site in this manner
, but it could take a whole year or more before Google will contemplate re-indexing your web site.
This could cause a lot more damage than good, but it is astonishingly easy to make these errors if you do not understand much about SEO.

Those who run professional SEO firms and offer professional SEO services understand which
steps not to take, nonetheless, so you will not have to worry nearly as much about these penalties if
you leave the occupation up to someone who does it for a living.
Quote
 
 
-1 #254 organic seo company 2014-12-03 06:25
You Can Get Help with Other Things. Designing a site,managing your social media marketing campaigns, assembling more and a site can be a lot to do by yourself,
but many firms that offer SEO services can help
you with these things too. This can take even more off of your plate and additionally help ensure that you simply get the results that you are going for.
Quote
 
 
-1 #253 seo hosting 2014-12-03 02:57
You probably already understand that search engine optimization is an essential if you want your
website to be successful, but you might be a bit reluctant to pay a professional for SEO services.
Although you might be thinking about handling the effort on your own, you should consider these five reasons for leaving the job to the professionals.
Quote
 
 
-1 #252 Demetrius 2014-12-03 00:29
You might be a bit reluctant to pay a professional for
SEO services, although you likely already understand that search engine optimization is an essential if you want your site to
be successful. Although you may be thinking about tackling the effort on your own, you should consider these five reasons for leaving the job to the professionals.
Quote
 
 
-1 #251 http://Cloudseoblog. 2014-12-01 12:54
You may be a little reluctant to pay a professional for SEO services, although you likely already know that search
engine optimization is an essential if you want your own site
to become successful. Although you may be thinking about tackling the campaign on your own, you should consider these five reasons for leaving the job to the professionals.
Quote
 
 
-1 #250 free internet 2014-12-01 10:35
It is More Cost-Effective. If you are contemplating opting for other marketing strategies instead and jumping the
SEO services, you ought to know that search engine optimization can actually
be a lot more cost-effective. Although it might seem as though it's a little more expensive than other alternatives in the
beginning, it additionally usually brings forth much better results.
Additionally, it lasts longer than things like pay-per-click advertising.
Therefore, you can in fact save money with time by
opting for the correct SEO services instead of spending all your advertising
dollars on other marketing methods.
Quote
 
 
-1 #249 Another World 2014-11-29 18:00
Wonderful, what a web site it is! This weblog
provides valuable facts to us, keep it up.

my homepage :: Another World Aoleon The Martian Girl: http://www.redirect.pro-area.com/?popular_music_1949_404179
Quote
 
 
-1 #248 iphone 6 hands on 2014-11-29 14:44
I every time spent my half an hour to read this webpage's content everyday along with a cup of
coffee.

my blog: iphone 6 hands on: http://tisec2008.nccu.edu.tw/images/info.php/RK=0?a%5B%5D=%3Ca+href%3Dhttps%3A%2F%2Fitunes.apple.com%2Fbn%2Fartist%2Felan-noelle%2Fid664938802%3Eapple+music%3C%2Fa%3E
Quote
 
 
-1 #247 advertise for 2014-11-28 21:50
It is so important to understand these ads run by British Portals are visited
by people across the world. You can rely on the Internet to
offer access to these specialized websites, in turn providing access to accurate information. The
amazing UK job portal has planned listing into categories along both functional and regional hierarchies because of which a job seeker can effortlessly organize the best employment option and post resume and get
to explore the UK recruitment.

Look at my weblog advertise for freelance video editors: http://thechapmagazine.co.uk/2012/09/reproduction-vintage/
Quote
 
 
-1 #246 Another World 2014-11-28 19:37
Write more, thats all I have to say. Literally, it seems as
though you relied on the video to make your point. You definitely know what youre talking about, why throw
away your intelligence on just posting videos to your site when you could be
giving us something enlightening to read?

My weblog Another World Aoleon The Martian Girl: http://entertwine.net/elan-noelle/
Quote
 
 
-1 #245 mass ping 2014-11-28 13:22
It's an remarkable post for all the online users; they will
take benefit from it I am sure.
Quote
 
 
-1 #244 Trent 2014-11-28 10:59
It's simple to make errors when running an SEO campaign, including
using your key words too many times or posting links to yoursite
in the wrong spots, but these mistakes can cause important punishments for your
site and can get you vanish from the ranks entirely. So, it's a fantastic thought
to rely on a business that offers SEO services professionally; then, you don't need to worry as much about
makingblunders or being penalized. If you're considering handling your campaign all
by yourself, you should undoubtedly at least think about speaking to
someone who offers these services to see how much it will cost and what you can expect.
Quote
 
 
-1 #243 neueseovancouver.ca 2014-11-28 08:02
Companies that offer SEO services occasionally offer other useful services which can assist you in making your site a success.
For instance, you maybe able to hire an SEO service to create and preserve a PPC advertising campaign or a social media marketing effort for you.These professionals normally have a lot of experience
in these issues and can so be sure that these campaigns and more are carried out
absolutely.
Quote
 

Add comment


Security code
Refresh