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 #178 date advice for men 2014-09-15 02:35
Greetings from California! I'm bored at work so I
decided to browse your website on my iphone during lunch
break. I really like the info you present here and can't wait
to take a look when I get home. I'm shocked at how fast your blog loaded
on my phone .. I'm not even using WIFI, just 3G ..

Anyways, awesome blog!
Quote
 
 
0 #177 Garage Flooring 2014-09-15 01:19
Hardwood flooring is ɑnother beautiful highlight fօr anyy rߋom on үour property.

Вut tɦere are mаny օther exercises tɦat can give youu the same type οf benefits.

TҺeir anti-slip quality іs another reason it iѕ
wіdely used in homes аnd commercial centres.
Quote
 
 
0 #176 http://www.161989up. 2014-09-12 10:45
Thanks for sharing your info. I really appreciate your
efforts and I am waiting for your further post thank you once again.

my blog - http://www.161989up.com: http://www.161989up.com
Quote
 
 
0 #175 http://akkunasavo. 2014-09-09 09:23
It's fantastic that you are getting ideas from this paragraph as well as
from our argument made here.

My blog; Profile (http://akkunasavo.planeetta.com/user/view.php?id=572906&course=1: http://akkunasavo.planeetta.com/user/view.php?id=572906&course=1)
Quote
 
 
0 #174 attract women in a 2014-09-08 11:50
I like the valuable info you provide in your articles.
I will bookmark your weblog and check again here frequently.
I'm quite sure I will learn a lot of new stuff right here!
Best of luck for the next!
Quote
 
 
0 #173 dating advice 2014-09-07 09:50
Spot on with this write-up, I absolutely believe that this site needs a lot
more attention. I'll probably be returning to read more, thanks for the advice!


Feel free to surf to my web blog ... dating advice: http://bluecactus.ca/These-3-Idea-Might-Help-You-Reconnect-With-Her.htm
Quote
 
 
0 #172 dating advice for 2014-09-06 23:46
I visited several blogs but the audio feature for audio songs present at
this site is actually excellent.

My blog post: dating advice for women: https://independent.academia.edu/KermitChute/Posts/2695237/Hey-there-first-off-I-like-to-thank-you-for-reading-this-post.-If-you-desire-to-get-your-ex-sweethea
Quote
 
 
0 #171 home theater 2014-09-06 17:42
First of all I would like to say fantastic blog! I had a quick question that I'd like to ask if you don't mind.
I was curious to find out how you center yourself and clear your mind before writing.
I've had difficulty clearing my thoughts in getting my thoughts out.
I do enjoy writing but it just seems like the first 10 to 15 minutes are lost simply just trying to figure
out how to begin. Any recommendations or tips? Cheers!
Quote
 
 
0 #170 jd-app.com 2014-09-06 17:01
It's actually a great and useful piece of information. I am glad that you just shared this useful information with us.
Please stay us up to date like this. Thanks for sharing.


Feel free to surf to my webpage - dating advice for women (jd-app.com: http://moni.jd-app.com/The_Primary_Means_To_Get_Your_Ex_Back)
Quote
 
 
0 #169 home theater 2014-09-06 07:34
I think this is among the most significant information for me.
And i am glad reading your article. But wanna remark on some general things, The web site style is ideal,
the articles is really great : D. Good job, cheers
Quote
 
 
0 #168 home theater install 2014-09-06 07:33
I've been surfing online more than 4 hours today, yet
I never found any interesting article like yours. It is pretty
worth enough for me. In my view, if all webmasters and bloggers made good content as you did,
the web will be a lot more useful than ever before.
Quote
 
 
0 #167 Ludie 2014-09-05 11:59
This is really interesting, You're a very skilled blogger.
I have joined your rss feed and look forward to seeking more of your wonderful post.
Also, I've shared your web site in my social networks!


Stop by my web page; relationship problems (Ludie: http://listbuildingproducts.net/980/101-pointer-on-the-best-ways-to-get-him-back/)
Quote
 

Add comment


Security code
Refresh