The Raspberry Pi is made by the Raspberry Pi Foundation, a UK charity organization. For this reason the Debian SD card image (and presumably the others) default to the English – UK locale, timezone, and keyboard layout. For those of us in America, this is clearly not going to work! Clayton Smith excellently documents the procedure for Canadian’s in this post on his blog. I followed his procedure, replacing en_CA with en_US. To make it a little easier to follow, I have turned this into a photo-tutorial using PuTTY to remotely SSH into the device from my Windows 7 running Desktop PC.
First up is logging in, which uses the username pi
and password raspberry
.
Next, change the system locale from en_GB.UTF-8
; to en_US.UTF-8
by running the command sudo dpkg-reconfigure locales
.
Use the arrow keys to move up/down and highlight options. Use the spacebar to select/deselect the options.
Press tab to select <Ok> and then press enter.
Confirm your selection.
The Raspberry Pi will now generate the selected locales.
Now, it’s time to set the keyboard layout. Run the command sudo dpkg-reconfigure keyboard-configuration
.
Next, we need to set the timezone. Run the command sudo dpkg-reconfigure tzdata
.
Use the up/down arrows to select the appropriate location and press enter.
Use the up/down arrows (again) to select the appropriate timezone (closest city in your timezone) and press enter.
The Raspberry Pi will acknowledge the timezone change.
Next up is to modify the Debian packages source to use the US mirror (rather than the British one). Run the command sudo vi /etc/apt/sources.list
.
Change the uk to match your two digit country code (us for me).
Write the changes to disk by pressing escape and then entering :w
and pressing enter.
vi (the text editor) will confirm that the changes were written to the disk.
Quit vi (the text editor) by entering :q
and pressing enter.
Then, run sudo apt-get update
to update the package lists with the new source.
Finally, run sudo reboot
to reboot the Raspberry Pi and confirm your changes.
Congratulations, your Raspberry Pi has been “Americanized!”
Pingback: Making the Raspberry Pi a little less British | Clayton's Domain
Great tutorial! I'm sure beginners will find it more useful that my blog post. I've updated my post with a link to it.
Thanks Clayton! Your blog post is a great resource for more advanced users but I thought there should be write-up for beginners as well. Naturally, that *needed* pictures, and the tutorial exploded outward from there! Thanks for the link-back!
Thanks for the info!
Also, you may need to run "sudo setupcon" after completion (to speed up the 'setting preliminary keymap" step while booting).
Found the instructions here: http://www.raspberrypi.org/phpBB3/viewtopic.php?f…
Thanks for adding that Eric! I haven't been able to run that myself (via SSH) but it probably applies to newer builds.
Super Tutorial
Have posted a link on my site for other people to follow
Cool! I'm glad you found it useful!
Pingback: Raspberry Pi – Setting up raspberry pi for american customers « Frustrated IT Engineer
Pingback: Random Links of the week | Raspberry PI Community Projects
If you configure PuTTY to use UTF-8 character encoding, you’ll see the proper borders instead of odd characters on the package configuration screens.
Good tip – Thanks!
I use SecureCRT for SSH, it encodes the screen properly. Thank You for sharing this article, very helpful!
I've been using the Raspbmc images, and these steps are the same there. It would be great if someone would make a simple batch file that could be easily distributed to accomplish this for us lazy people.. Sounds like I probably will have to do that one of these days.. haha.
MrWareWofl, I saved you the trouble. Save the below code as a shell script (whatever.sh) and execute it. I commented out the reboot at the end, but you can remove the pound sign if you desire that behavior. Please note that I didn’t test this on an actual Raspberry Pi, but I don’t see any reason why it shouldn’t work on one.
#!/bin/bash
sudo grep ^en_US\.UTF-8 /usr/share/i18n/SUPPORTED > /var/lib/locales/supported.d/local
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure keyboard-configuration
sudo echo "America/Chicago" > /etc/timezone
sudo dpkg-reconfigure -f noninteractive tzdata
sudo sed -i '/ftp.uk.debian.org/s/uk/us/g' /etc/apt/sources.list
sudo apt-get update
#sudo reboot
Oops, I forgot the sudo on the dpkg-reconfigure -f noninteractive tzdata line. Be sure to add it in.
I took care of modifying it. Thanks for writing this script up!
Cool Stuff… Thanks for sharing this script..
Works great, thanks!
Nice, thank you!
Fantastic work! This is the type of information that should follow collective approximately the web. Embarrassment captivating position Google for not positioning this transmit higher!
Software testing online training
Software testing certification training