This page is my reference for basic config of a Raspberry Pi image.
The latest version of Raspbian can always be found at www.raspberrypi.org/downloads
- Download and extract the Raspberry Pi operating system;
- Download and extract the Win32DiskImager software, win32diskimager-binary.zip (currently version 0.6);
- Write Raspbian to the SD card (in Windows Vista, 7 and 8 it is recommended that you right-click win32diskimager.exe and choose “Run as administrator”).
On the Raspberry Pi:
Booting Raspberry Pi for the first time
- On first boot you will come to the Raspi-config window.
- Timezone and locale is GMT by default
- Check ssh is enabled
- Select expand_rootfs and say ‘yes’ to a reboot
The Raspberry Pi will reboot and you will see the login prompt:
User: pi Pwd: raspberry
Start the GUI with startx
Fix the ip address:
cd /etc/network sudo nano interfaces
replace the line “iface eth0 inet dhcp” with
iface eth0 inet static address 192.168.xxx.xxx netmask 255.255.255.0 gateway 192.168.xxx.1
Also check /etc/resolv.conf and check it has a nameserver entry (probably pointing at your default gateway) or direct to your ISP name servers.
nameserver 184.108.40.206 nameserver 192.168.xxx.1
…if the file has the following:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN
then it is using resolvconf program which should instead be configured using the following two lines in /etc/network/interfaces
Check using ifconfig to confirm static ip address.
Run X Server from a Linux machine:
ssh -X <ip address of Rpi> -l <username on Rpi>
Connecting in this way gives a terminal where any graphical program run will be presented on the connecting machine (running the X server) e.g.
midori will run the Pi’s browser, displayed on the remote machine.
Install VNC Server on the Raspberry Pi
sudo apt-get install tightvncserver
…run the VNC Server on the Pi…
vncserver :1 -geometry 1280x800 -depth 16 -pixelformat rgb565:
:1 is the port on which the server is running)
This will start the VNC server process on the Pi. What this means is that it will start a virtual X session (a virtual instance of the Raspberry Pi GUI) on your Pi, in a very similar way to when you run startx when your Pi is connected to a display. When you VNC into your Pi you will be connecting to this X session.
…then connect to the Pi with your VNC client of choice e.g. xvnc4viewer