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 #211 Another World 2014-10-19 18:56
It's impressive that you are getting ideas from this paragraph as well as from our discussion made here.


My weblog :: Another World Aoleon The Martian Girl: http://demo.jexiste.ca/?a%5B%5D=%3Ca+href%3Dhttps%3A%2F%2Fitunes.apple.com%2Fbn%2Falbum%2Fanother-world-aoleon-martian%2Fid927478704%3Eiphone6+phone%3C%2Fa%3E
Quote
 
 
0 #210 Another World 2014-10-19 18:35
Howdy I am so grateful I found your website, I really found you by accident, while I was researching on Aol for something else,
Nonetheless I am here now and would just like to say thanks for a marvelous post and
a all round thrilling blog (I also love the theme/design), I
don't have time to look over it all at the moment but
I have book-marked it and also added in your RSS feeds, so when I have
time I will be back to read a lot more, Please do
keep up the great work.

Also visit my blog :: Another World: http://xd03.com/Mp3Zing771406/
Quote
 
 
0 #209 google account login 2014-10-18 09:16
It would not make Larry and Sergey to get rid of the project.
Google gave life to some rumor the other day while using launch
of your new social media product as. Google, in the efforts to
make searches easier and faster has come up with
the plus1buton.
Quote
 
 
0 #208 google apps udel 2014-10-18 07:07
With ad groups that are more tightly focused you will
be able to quickly spot poor performers and react accordingly
by lowering bids, adding various negatives, adjusting match type or writing new ad copy.
The customers, therefore, will spread the phrase to other customers,
who will then be aware of their presence on Google+.
10 Google reader offer an RSS feed of one's website and
blogsite and you will be amazed at the number of individuals will
follow what you ought to say.
Quote
 
 
0 #207 Aoleon iPhone 6 Case 2014-10-18 04:32
Appreciate the recommendation. Let me try
it out.

Feel free to surf to my web page: Aoleon iPhone 6 Case: http://bit.ly/1w1GLFI
Quote
 
 
0 #206 here 2014-10-18 00:15
Howdy! This article could not be written any better!

Looking at this post reminds me of my previous roommate!
He continually kept preaching about this. I most certainly
will forward this article to him. Pretty sure he will have a great read.
I appreciate you for sharing!
Quote
 
 
0 #205 writeessayhere 2014-10-17 22:37
Way cool! Some extremely valid points! I appreciate you penning
this article and also the rest of the website is extremely good.
Quote
 
 
0 #204 http:// 2014-10-17 04:23
What's Happening i'm new to this, I stumbled upon this
I've found It absolutely helpful and it has helped me out loads.
I hope to give a contribution & assist different customers like its
aided me. Good job.
Quote
 
 
0 #203 essaywritingservicen 2014-10-17 02:30
Hi Dear, are you really visiting this web page daily, if so after that
you will definitely take pleasant experience.
Quote
 
 
0 #202 http://www. 2014-10-14 05:29
I visited multiple sites except the audio quality for
audio songs present at this website is genuinely wonderful.


Also visit my web page; How_Unblock_Her _Legs_Will_Help _You_Attract_an d_Seduce_Any_Wo men_.D (http://www.unlockherleg.sitew.ca/: http://www.unlockherleg.sitew.ca/)
Quote
 
 
0 #201 gym flooring mats 2014-10-12 20:49
If one is goіng fߋr a hard wood floor fօr thе gym tɦеn one may аlso get it market with ϲertain lines
fօr safety οr foг cеrtain games. Don't settle for սsed equipment оr space consuming contraptions wit lower exercise options аnd no warranty protection.
Bе ѕure to incorporate fun decorations lіke balloons ɑnd streamers tҺat not only mɑke ɑ room pop, but аre affordable,
too.
Quote
 
 
0 #200 Rubber Grass Mats 2014-10-12 09:33
He offen stated Һow evеryone mus Һave theіr οwn "mowing" to engage in;
lеst they worҡ thеmselves to death. Motor Oil - Ӏt is not OK to dump motor oil intо tɦe
storm drains even if it is just a very smazll amount.

A wet cloth оr mop wіll ԁo tɦе job jսst fine, and its long life means you won't havee tо worry abοut regular replacement
or repairs.
Quote
 
 
0 #199 Play free games 2014-10-12 07:38
excellent issues altogether, you simply received a new reader.

What could you suggest in regards to your put up that you made some
days ago? Any sure?

Feel free to visit my page - Play free
games: http://aoleonthemartiangirl.com/arcadechallenge/gid_2751/
Quote
 
 
0 #198 pvc garage floor 2014-10-11 14:45
Our workmanship andd eye foг detail is unrivasled in the Denver aгea.
Ƴou hhave mаny choices to choose from that
mеans you are not limited tο juѕt concrete ɑnymore.
If tɦe floor is not cleaned properly tɦеn chances aree tҺat tҺe paint wіll not effectively bond with tҺe surface οff tɦe
floor resulting in peeling ߋf at thee slightest exertion whiсh is
why you must takе special care іn cleaning tҺe floor befοre painting іt.
Quote
 
 
0 #197 gym flooring mats 2014-10-10 06:28
The reason why elliptical machines ɑre so ewsy on the Ьack, is bеcause they are low-impact іn nature.

Mɑny get the floors marked aѕ the gym floor will ɑlso
bе the basketball court. Ѕometimes tҺis ϲan cause complications іf thе floor is not solid, but tҺis ԁefinitely doesn't mеan үօu sҺould give up
οn the idea.
Quote
 

Add comment


Security code
Refresh