Raspberry Pi for Windows Users

Raspberry Pi - Help for Windows Users

This is stuff that (even as a Windows Power User) took me a while to work out. I made this page, partly to shame people who should know better, but mostly to help Windows users try the Pi out successfully.

The most annoying thing you'll find when looking on the internet is inaccuracy in example programs. Quite a lot of the Linux example programs you find won't work. Partly (I think) this is due to the different variants of Linux/Unix, but it's also certainly due to a lot of carelessness and careless assumptions.

Another annoying thing is, well to be blunt, the lack of ability of many people to explain Linux things clearly and concisely. Just look at..ah, just go search, you'll find examples soon enough...


Anyway, here are some very useful tips (I think so anyway).

Send comments to me on pi123@mrcontrol.co.uk. Comments/insults will be appreciated/laughed at, and just possibly used here to improve this page.

*** Do not save this email address as, due to high quantities of spam, this email address will change regularly


On this page


Is the Raspberry Pi any good?

Top ^

I think it's marvellous

You need to work at it though, don't buy it expecting to run office on a cheap PC, buy it if you want to learn programming and understand a bit more how computers work



Using a Command Prompt

Top ^

How do I run a command prompt? (and if you don't use the command prompt in Windows, well, you should. You can use a Windows computer much, much better)

Double click on "LxTerminal"

Apparently it's called a 'shell' in Linux. This is it:

When you type, text appears after the $

So is the shell much better than the Window command prompt (as Linux users say)?

It's a bit better yes. It's still rather tedious and clunky though as any Xtree/Ztree user will tell you (but that's another story...). Try the "mc" program, this is very much like the ancient 1990s PC Tools, but it's better than nothing and it will help you understand the directory structure.

Give me some examples;

(Windows) dir = (Linux) ls

(Windows) cd \ = (Linux) cd /home (yes Unix uses the '/', Windows uses '\')

To be fair, the Linux shell is better is nearly every way apart from ...

Linux can't cope with "cd.." (no spaces) like windows though, which I find most annoying. You have to type "cd .." (a space before the dots). Ah well, can't have everything

For more information, look here for example - it's written quite nicely and is full of useful bits. Remember... don't type the '$' in the examples and sometimes you see '#' instead of the '$' (it's all the same (to start with anyway), see bash).



Getting that very first menu back

Top ^

To get the menu that appeared the very first time you booted up the Pi:

At a command prompt, run

sudo raspi-config

from a command prompt, like this:


Shutting down the Pi

Top ^

Can't I just turn it off?

Yes, but you know it's going to corrupt something sooner or later; instead, run

sudo halt

from a command prompt. Then turn it off


Rebooting the Pi

Top ^

How do I reboot it?

There's a little icon bottom right, click on that and select reboot

If it's not there, (which it won't be if you remote desktop in) run

sudo reboot

from a command prompt


Is Linux the same as Unix?

Top ^

Answer for Linux users: No, it's as different as chalk and cheese

Answer for Windows users: Yes, it's exactly the same


How do I pronounce Linux?

Top ^

Answer for Linux users: Lin-nux, not Line-ux

Answer for Windows users: 'Unix'


What's Debian and Raspian?

Top ^

Answer for Linux users: You should be telling me

Answer for Windows users: It's all the same Linux with some slight variations, probably too slight for us to worry about


How do I get a wired ethernet link?

Top ^

Either connect your Pi to a network with DHCP enabled (ie a network when you plug your computer in and something gives it an IP address - however I'd assume that if you're looking here you haven't got one) or

Edit this file...

sudo nano /etc/networks/interfaces

and change the entry from "iface eth0 inet dhcp” to this (for example):

iface eth0 inet static

address 192.168.0.5

netmask 255.255.255.0

gateway 192.168.0.1

Obviously (!) put your required IP address and gateway in.

Also edit this file...

sudo nano /etc/resolv.conf

and add this entry at the bottom (for example):

nameserver 192.168.0.1
Obviously put your required DNS (often the same as the gateway, but not always)
Not sure what you need? Try running 'ipconfig' from an internet-working windows machine to get this information

I found I had to re-enter the 'nameserver' information every time I connected to a wired connection after using a wireless one....


How do I get a wireless ethernet link?

Top ^

Run that WPA-GUI program, it's fairly clear...

Edit this file...

What's Python?

Top ^

It's yet-another-programming language. It's a bit like C, but much more forgiving. Although, every language is, of course.


What's Idle?

Top ^

It's a method of running and testing Python programs. Personally I use an editor (nano) and the command prompt, sorry shell, but you might like it.


Why can't I use 'print' in python, why don't the examples work?

Top ^

When I follow python 'print' examples do I get a syntax error?

Use

x=3

print (x)

instead of

x=3

print x

Er, so why does the Pi 'user guide' say use print without the brackets?

Good Question!

Actually, Python v2 works without brackets, Python v3 with. Both seem to be present on the Pi. Extremely silly and most confusing in my opinion.


What's bash?

Top ^

It's just the name of the shell (command prompt to you and me). There's a few different ones around, Pi has a '$' as the cursor, some have '#'.


What's sudo?

Top ^

Answer for Linux users:It's used to run programs as root (administrator). You don't do it by default to make the computer safer and more robust.

Answer for Windows users:Same as 'Run as administrator'. You'll use it a lot.


So are Linux machines much safer as far as Viruses/trojans/etc go?

Top ^

Answer for Linux users: Yes, much more secure

Answer for Windows users: Nah.


How do I make a bat file?

Top ^

Make a text file like you do with Windows (use nano), and use the command

chmod +x MS

where "MS" is the name of your program. Now type

./MS

and your program will run (but only from the directory you're in). To make it run from any directory put the file into /etc/...???


How do I edit a text file?

Top ^

Use the 'nano' text editor (I expect there's more):

nano filename

sometimes, you have to use:

sudo nano filename

(generally if it's a system file) - although you won't know this until you try to save the file after doing your changes...

Do some SD cards not work?

Top ^

All the ones I tried did, from Class 4 to Class 10, from 4Gb to 32Gb.

PS, if you live in Bristol, England, the cheapest and best place to get them is here (no affiliation, I'm just a satusfied customer)


Should I get it from Maplin (this is for UK users)?

Top ^
I did, it's more expensive, but it all works - within 3 minutes of first power-on (and only knowing a little about unix) I was connected to the internet, wirelessly (which impressed me no end), and it's been solid. Other people have had problems with underpowered PSUs and drivers for wireless units, the maplin one will avoid all this. Depends how much you value your time vs money. You decide, but it was a good choice for me.

Some of the addons are a bit expensive though - the case is 3 times as much as from RS, so's the HDMI-DVI cable (local PC shop is best for this).


How do I Remote Desktop (RD) from Window into the Pi?

Top ^

From a command prompt do this:

sudo apt-get install xrdp
Say 'Y' if asked

Restart the Pi

You should now be able to access the PI from a Windows machine. On the windows machine type

Start, Run, mstsc (for example)
and enter the IP address of your Pi

More useful information about this here. Obviously (to me anyway) you really, really ought to change the RD port, when I find out how to do, I'll add it here.

How do I remote desktop from Pi to Windows?

Top ^

Run this from a command prompt;

sudo apt-get install remmina
Now you should be able to find 'remmina' on the 'other' menu...and off you go!

How do I ?

Top ^

Answer for Linux users:


How do I ?

Top ^

Answer for Linux users:


How do I ?

Top ^

Answer for Linux users: