Update: This article is outdated! The old Debian Squeeze image is no longer available. Please use the new Raspbian Wheezy image instead.
I had some free time today so I played with my brand new Raspberry Pi. Here is what i have done so far using the Debian Squeeze image.
1) Install the Vim text editor
To install my favorite text editor:
sudo apt-get install vim2) Changing the localization, the keyboard layout and the timezone
To change the localization:
sudo dpkg-reconfigure localesTo change the keyboard layout:
sudo dpkg-reconfigure keyboard-configurationTo change the timezone:
sudo dpkg-reconfigure tzdata3) Disable the overscanning
Overscanning is the black frame around the four edges of the video image. To disable the overscanning you need to create a text file config.txt on your boot partition /boot an put in the following text:
disable_overscan=14) Install bash autocompletion
First you need to install the bash completition:
sudo apt-get install bash-completionThen you need to activate it by changing the file /etcbash.bashrc. First you need to open it with a text editor:
sudo vim /etc/bash.bashrcAnd remove the hashtags # from the beginning of the following lines:
# if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
# . /etc/bash_completion
# fi5) Reconfigure the OpenSSH server
The SSH server in the Debian Squeeze image is deactivated by default which is good for security reasons. The password for the user pi and the ssh private keys are available in the public. You can start it with the following line:
sudo /etc/init.d/ssh start5.1) Activate SSH boot by default
To activate the ssh server at boot simply rename the file boot_enable_ssh.rc to boot_rc on your boot partition:
sudo mv /boot/boot_enable_ssh.rc /boot/boot.rc5.2) Create new SSH keys
Delete the old ones:
sudo rm /etc/ssh/ssh_host_*keyAnd create new keys:
sudo dpkg-reconfigure openssh-server5.3) Change the SSH port
Changing the ssh port will stop many automated attacks and will add a little bit security though obscurity. To change the port of the SSH server you need to edit the file sshd_config with a text editor:
vim /etc/ssh/sshd_configEdit the line which states Port 22 and change the number to a port not currently used on the system
# What ports, IPs and protocols we listen for
# Port 22to e.g.:
# What ports, IPs and protocols we listen for
# Port 50633And restart SSH:
/etc/init.d/ssh restart6) Create a new user and remove the user pi
First we activate the root account by creating a password for the user root:
sudo passwdNow you need to close all sessions and re-login as root.
Because of some configuration error the user pi has been created twice. So we need to manually delete one. Open the file passwd with a text editor:
vim /etc/passwdAnd delete the line:
pi:x:1001:1001::/home/pi:/bin/bashNow we can delete the user pi and his home directory:
deluser —remove-home piAnd add a new user:
adduser usernameSet the groups:
usermod -aG adm,dialout,cdrom,audio,plugdev,users,lpadmin,\
admin,sambashare,vchiq,powerdev usernameTry to login with the new username and password and try to get sudo. If this works disable the root account:
passwd -l root7) Update the system and the firmeware
To update the system:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgradeTo update the firmeware:
create a root shell:
sudo -sinstall the git certificates:
apt-get install git-core ca-certificatesDownload the update script to /usr/bin and set the excecutable flag:
wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update \
&& chmod +x /usr/bin/rpi-updateExcecute the update script:
rpi-updateReboot the raspberry pi:
rebootWRITTEN BY

Sebastian Glahn is a Senior Software Engineer living in Cologne. He writes about Software Development, 3D-Printing, Robots and other stuff. He is also a maintainer of several open source projects.