A guide to getting started with the Raspberry Pi. Begun by Abishur, post edited and expanded by Mahjongg and Lorna.

Getting started and general questions

If you would like to buy a Pi and/or accessories, and are looking for advice on this, you might like to consult the pictorial buying guide

You can find the latest quick start guide on the Raspberry Pi website. This start guide uses the NOOBS installation system: the latest version of this comes with the Raspbian OS as standard, but other OSes can be installed when you connect the PI to the internet via the ethernet port.

If you have trouble getting your PI to boot, or have difficulty getting any video output, you might find it helpful to read the boot problems sticky.

If you have you Pi set up and working, and want some ideas for what to do next, you could check out our Resources page.

Getting to grips with your Pi

Arrange your board to look like the photo and let's get connecting!

If you have the model B+, orient it like this:

If you are working with the original model B, orient it like this:

If you are using a model A+, orient it like this:

or a PI Zero, like this:

In the centre of the bottom edge of the board, (bottom left for zero) you will find the HDMI port, or mini HDMI port for the zero. Connect a (Mini) HDMI cable from the board to your TV or HDMI Monitor for video and audio output, or to a DVI-D monitor for video only.

If you don't have a TV or monitor with an HDMI or DVI-D port, there are alternative ways to get audiovisual output. On the models A and B, you can use the yellow RCA jack located in the centre of the top edge for video output. For audio output, you can use the 3.5 mm stereo headphone jack to the right of the RCA jack. The models A+ and B+ have a single connector for both audio and video: it is marked "A/V", and is located at the bottom of the board, to the right the HDMI port. You will need an A/V adapter cable, as detailed in the pictorial buying guide.
The Zero has a pair of pinheader solder points, to which you can solder a pinheader, or a mini coax RCA cable directly. The left (square) position is the signal, the right (round) position is for the shield (Ground). The Zero has no direct analog audio output, but HDMI audio works fine. If you must have analog audio out, you can do three things: use a I2S codex (in the form of a (micro) HAT board), or use an USB audio device, or solder some resistors and capacitors to a few GPIO's to change PWM into stereo audio, and change some software settings, more about this option elsewhere in the forum.

Plug a USB keyboard and mouse into the USB slots located on the right edge (left microUSB on the zero). You can also plug a WiFi adapter into the USB slot for wireless internet access. If you are using the older A or B models, you will probably wish to use and externally-powered USB hub to expand the number of available USB ports.

For the B, B+ and 2B, Just below the USB ports on the right edge of the board is the ethernet connector: this enables you to connect your Pi into a wired network.

On the underside (topside for Zero) of the board on the left edge is a slot for your (micro)SD card. You can buy a pre-imaged card with NOOBS already installed from our Swag Store, or you can make one yourself. You can find more information on NOOBS, and on installing your operating system, later in this post.

Finally, at the very bottom of the left edge (right microUSB on the Zero) is the micro USB power connector. Plug in a regulated power supply that is rated at 5V ±5% and at least 700mA (or 0.7A). Anything bigger than 700 mA (like 1000mA) will also work. Avoid using the smaller chargers used for small GSM phones, as these are often unregulated and unreliable. The model B+ and the Pi 2 can use adapters up to 2.5A, but they are actually more frugal with power than the older models, and will probably work with a 700mA adapter, or maybe even less (depending of how much current the USB and HDMI ports use). Please note, though, that using several USB devices or working on intensive tasks will draw much more current. If the PWR LED goes off, you are providing insufficient power (But note that the Zero does not have a power LED, but uses much less power than other models (0.16A) so is less likely to fail due to bad power)!

If you are having problems with power to your Pi, you should not only check the supply itself, but also the cable from the power supply unit to the Pi: frequently, cables can lower the current/voltage going from the power supply unit to the Pi to below the level required for stability.

What if you are not sure if you have a micro USB power cable? This picture clearly shows the difference:

The mini USB (on the left) is the wrong one. It’s thicker and looks like a trapezoid with its sides pinched in. The micro USB (on the right) is the correct one. It is thinner and also looks like a trapezoid except its sides are rounded outward. It is very important to buy a good-quality cable if you want to ensure that your Pi receives a stable supply of power. Use a short, reasonably thick cable, and be prepared to spend at least a few pounds (or the equivalent) on it. If you would prefer to buy the official Raspberry Pi Universal Power Supply, you can do so via our Swag Store.

Installing NOOBS

Visit our Downloads page to get hold of an OS to use with the Raspberry Pi, together with instructions for how to put upload it to your SD card. Raspbian is the preferred option, but don't be afraid to download all the available options, and test them out for yourself!

Before installing NOOBS on your SD card, you must first erase the card completely, and remove all partitions, using the SD Card Association’s formatting tool: https://www.sdcard.org/downloads/formatter_4/index.html. DO NOT use its quick format option, especially if the card has been used before, or the install might fail. Also use the "resize" option, and label the format "noobs", NOOBS will partition and format the card as neccessary, but it needs to begin with a completely empty card.

When you have loaded NOOBS onto the card, it should contain these files:

[attachment=0]NOOBS.png[/attachment]

If you just need to install a single OS, and want to save download time and space on the SD card, you could consider using NOOBS LITE instead of NOOBS. NOOBS LITE doesn't come with any OSes included, but the OS to install is downloaded during the installation process. Please note that you will need your Pi to be connected to the internet for this to work.

Once you have finished setting up your Raspberry Pi, it's time to try powering it on and using it. Connect the micro-USB cable to your Pi and a power source. When the Pi begins to receive power, the red LED marked PWR will light (except for the zero). The green LED marked OK (or ACK in later version) will blink in an irregular pattern to show whenever the Pi reads from the SD card.

Please note that the BIOS for the Pi is stored on the SD card, so, if booting is unsuccessful, the Pi will show nothing on screen. If you have trouble getting your Pi to boot, read the guide to boot problems, which contains all the troubleshooting information available at this time.

If all goes well and the OS boots successfully, the Pi will first show a rainbow screen: this is actually four pixels expanded and blended to full screen size by the GPU, and is a GPU selftest. Shortly afterwards, the ARM processor starts, and the installed OS begins to load. Raspbian starts by showing a long scrolling text that tells you exactly what the Pi is doing to get ready to work. If you have a Pi 2 which gets stuck at this point, you are probably using obsolete firmware: see below for updating and upgrading the version of the OS you are using.

Once the Pi finishes loading the OS, you'll need to put in your user name and password: the default username is "pi", and the default password is "raspberry". Note that, when you enter the password, nothing will be displayed on the screen: this is a security measure. It is possible that this step may be skipped the very first time you boot.

After that (but only the first time you boot) you will be presented with the "raspi-config" configuration menu.

You should use this to expand the space on your SD-card to the full size of the card (otherwise not all of the space on the card will be actually used), to enable overscan for your monitor, and to set the keyboard configuration. You can also use this menu for other basic configuration options such as changing your password.
The menu won't be shown on later boots, but can be recalled at any time by using the following code:

This will shut the Pi down safely, after which you can turn it off by turning off the power supply. Please do not turn the power supply off without first shutting the Pi down: to do so might damage the SD card's file system.

Congratulations! You now have finished your first session!

How to get composite video working with NOOBS

It is important to note that, when you are using NOOBS, and are using a A/V (or composite RCA) video for a regular TV (or mini display with a composite input), you will not immediately get any picture: you need to press 3 (for PAL), or 4 (for NTSC) repeatedly to switch over from HDMI to composite. You should wait a couple of seconds or so before starting to press 3 or 4, as NOOBS need to boot before it can start listening to the keyboard. If you want to know if NOOBS is receiving input from the keyboard, press Caps Lock: if you can toggle the CAPs LED on and off, NOOBS has booted and is reading the keyboard.

Keep pressing the 3 or 4 key until video appears: it doesn't matter if you use numpad or regular number keys for this, but note that on a French keyboard you do not need to press shift for numbers, as the system assumes an UK keyboard. After you choose either PAL or NTSC, the system asks if it can make that choice permanent. Do that, and continue with the install. Note that this choice will be carried over onto the installed OS, because it will be written into config.txt, overriding the HDMI auto detection of the OS.

If the picture is monochrome, you are using the wrong TV standard: try changing from PAL to NTSC, or vice versa. If you are using a B+ A/V cable of unknown origin or type, please note that not all similar looking cables work: with some (camcorder) cables it is possible that the video may come out of the red plug instead of the yellow (video) plug.

If you are using a HDMI connection, NOOBS should give you a picture automatically, but if it does not, or the picture seems wrong, you can try switching between "safe" and "optimal" HDMI video settings by pressing 1 or 2.

After installing (for example) Raspbian, the next reboot will start it rather than NOOBS: Raspbian has a slightly different way with coping with composite video. It will look to see if an HDMI device is connected; if it doesn't see one, it will automatically switch to (NTSC) composite (unless you have saved an overriding video setting into config.txt, as noted above).
If you are using an older PAL TV, you may only get a monochrome picture: you might want to change the entry in config.txt that says "sdtv_mode=0" to "sdtv_mode=2" for PAL. You can also do this from NOOBS: restart while holding down shift and the Pi will boot into NOOBS. Press 3 again for a composite picture and choose the option to edit config.txt, then edit, save, and reboot.

Updating and upgrading Raspbian

If you are using an older Rasbian distribution, especially on a pre-loaded card, you might want to upgrade and update Raspbian to the latest version. Ensure you are connected to the internet, reboot Rasbian, and enter the following code:

Special instructions for upgrading and updating Raspbian for users of the Pi 2

Since the release of the second generation Pi 2, you need to ensure that you are using a distribution of NOOBS and Raspbian which was released after the launch of the Pi 2.

If you have a card with Raspbian that boots correctly on your old Pi, but doesn't boot on the Pi 2, or which gets stuck at the "rainbow screen", the following procedure should result in a card that also works on a Pi 2:

You may find it useful to consult the official Raspberry Pi User Guide, written by Eben Upton and Gareth Halfacree.

You can find the Raspberry Pi Education Manual (an educational guide with focus on learning to program, written by a team of UK teachers from Computing at School) in the Raspberry Pi Store, accessible from your Pi's desktop. Alternatively, you can download it from the link given in this post.http://www.raspberrypi.org/archives/2965

P.S. I think the "programming the SD-Card" task might be underestimated, its not as simple as drag and drop contents to the card! What I have seen requires the use of the command line tool "DD", (or something similar) its not easy at all, and if you do it wrong the PI won't boot up! Living you in the dark (literally). The PI doesn't have a BIOS ROM, so no video will be generated until the PI can boot from the SD-card.

There should be a simple GUI program created that does the task in a foolproof way, because "fools" (that is adults, I trust little kids to do this fine) will also try to do this.

Luckily some people are selling pre-programmed SD-cards.

with the invention of NOOBS this largely has become obsolete too, although you can still do it wrong!

P.S. I think the "programming the SD-Card" task might be underestimated, what I have seen requires the use of the command line tool "DD", its not easy at all, and if you do it wrong the PI won't boot up! Living you in the dark (literally).

Take a look at this other beginners thread - I've posted a link to a DD tutorial of mine and the OP (itsonlyme) has provided a link to a great utility for managing SD card images:

P.S. I think the "programming the SD-Card" task might be underestimated, what I have seen requires the use of the command line tool "DD", its not easy at all, and if you do it wrong the PI won't boot up! Living you in the dark (literally).

Take a look at this other beginners thread - I've posted a link to a DD tutorial of mine and the OP (itsonlyme) has provided a link to a great utility for managing SD card images:

Reading that, and following the link to the tutorial, i'm even more convinced that its not a task for unexperienced users. I think a tool to create (and before that wipe the card) an image on an sd-card with a simple tool, requiring no more effort than selecting the image, and the card (with protection against selecting a hard-disk) is badly needed.

I know that the win32disk whatever program linked on the downloads page is insanely easy to use. I mean it's chose the img file you just downloaded, pick your SD drive and click write. Of course, the limitation with that one is that it really only works once. Once you write the img file windows can't read every partition on the card anymore, so before you can use it again you have to erase every partition via linux. I had a devil of a time doing that last night as I don't have an external SD card reader and my linux VM wouldn't see the SD card reader on my laptop. My final solution came via sticking the SD card in an unused blackberry phone and mounting *that* to my linux box. Fun times.

Still I kinda glossed over it in this (very basic) guide because of how complicated it is. There are much more complete guides that can be followed on the downloads page, and I saw no need to re-invent the wheel. Plus I'm expecting a better guide to come out (maybe one from someone who actually has the pi?), but I wanted a basic guide up to help the people who have already started getting the pi (lucky jerks! )

I"ve just tried it with a SD card that"s already been written and it appears to write correctly a second (and third) time.

But I don"t have hardware to test on and maybe it"s fooling me.

This is W7 64 and a 4G SD card plugged into the PC"s SD card slot.

I"ve also got a full SD formatter called "SD Formatter V3.0.0.0" It seems to be able to restore SD cards that have had some propriety format applied. I don"t recall where it came from other than at the end of a Google search.

I've succesfully created my 2GB image (latest Debian Win7) but have an 8GB SD card – how can I resize the partition to make available all my space, or would it be better to create another blank partition ? I only have Windows and the one RaspberryPI – no other Linux machine to do this on, which is how the Wiki details it.

I've succesfully created my 2GB image (latest Debian Win7) but have an 8GB SD card – how can I resize the partition to make available all my space, or would it be better to create another blank partition ? I only have Windows and the one RaspberryPI – no other Linux machine to do this on, which is how the Wiki details it.

Chris

The simple option (and I'm sure its detailed on the wiki as well) would be to boot a gparted live disk (on a usb key, or cd) and then use that to resize the partition of the sd card. So boot your windows computer with that disk instead it will go to a live linux, make sure the sd card is in the reader, pull it up in the options and away you go.

I think the last poster has lost the plot, since when will motoGp help us fire up our pi's for the first time.

As i'm not currently a Linux user, window C++, C# & microchip pic's I need a single port of call that will have an img and programs that when run on a PC will fire up the PI to a known stable point. From here I can go on to learn my around Linux and the PI.

Every new user can't wait to see it running and a fool proof way of doing this would give a bost to every new user.

PS could the maths test be made a bit harder i'm starting to get it right first time now!!

I'm brand new to Linux based OS and i was just wondering how to do the basics such as setting up a new profile eg not having 'Pi' as user id and getting a feel for the programs that come pre-installed if anybody could help or point my in the direction of instructions would be greatly appreciated.(sorry if i said something that makes no sense but as i said i'm brand new to this)

I'm brand new to Linux based OS and i was just wondering how to do the basics such as setting up a new profile eg not having 'Pi' as user id and getting a feel for the programs that come pre-installed if anybody could help or point my in the direction of instructions would be greatly appreciated.(sorry if i said something that makes no sense but as i said i'm brand new to this)

Pre-installed programs are few at the moment as far as I know, just a web browser, Python, and MIT Scratch.

I'm brand new to Linux based OS and i was just wondering how to do the basics such as setting up a new profile eg not having 'Pi' as user id and getting a feel for the programs that come pre-installed if anybody could help or point my in the direction of instructions would be greatly appreciated.(sorry if i said something that makes no sense but as i said i'm brand new to this)

Pre-installed programs are few at the moment as far as I know, just a web browser, Python, and MIT Scratch.

When you get your Pi, to make a new user (as far as I know)

sudo useradd NAME

sudo mkdir /home/NAME

chown NAME:users /home/NAME

Don't forget to add your NAME to the sudoers list too (if you want to sudo with it) - there is a post elsewhere on the forums for this, can't see it at the moment

So I flashed a 16gb scandisk x10 card with the debian image(ran the check image program)
Plugged in all the items then the power supply.
Monitor worked but debian seems to get stuck on
'input Genius optical mouse......'
'mmc0: Time out waiting for hardware interrupt.'

I have unplugged the mouse restarted(disconnected power)
It then get stuck on
'input USB keyboard......'
'mmc0: Timeout .....'
I have tried disconnecting everything and still get the same problem
Please help as I would love to move to the next stage

Sounds like an SD card problem to me - have you got another one you can try? Most importantly check through the troubleshooting page on the wiki but would also check your specific card on the list of known working/not working hardware which is here.

Have tried 2 SD cards now both x 10 will try tomorrow with a x4. WIll also check wiki

Have re flashed the sd card with debian6 19-04-12. Connected every thing and re powered.
All five leds are on.
1.OK=green
2.PWR=red
3.FDX=green
4.lnk=green flickering
5. 10M=yellow
Boot stuck on 'Kernel panic-not syncing:No init found. Try .....'
Have tried 2 SD cards now both x 10 will try tomorrow with a x4.
Could I have a faulty PI? I noticed a loose piece of metal(shaped like an L) where the SD slot connects to the board.

pyramid21 wrote:Have tried 2 SD cards now both x 10 will try tomorrow with a x4. WIll also check wiki

Have re flashed the sd card with debian6 19-04-12. Connected every thing and re powered.
All five leds are on.
1.OK=green
2.PWR=red
3.FDX=green
4.lnk=green flickering
5. 10M=yellow
Boot stuck on 'Kernel panic-not syncing:No init found. Try .....'
Have tried 2 SD cards now both x 10 will try tomorrow with a x4.
Could I have a faulty PI? I noticed a loose piece of metal(shaped like an L) where the SD slot connects to the board.

There are a couple threads discussing this error (try searching the forum for your No init ) but it boils down to the SD card or the keyboard