Tested on:Raspberry Pi 2
Prerequisites:Shared Internet connection over Ethernet
Hardware:Raspberry Pi, Power source, SD-Card >= 8Gb
Display, keyboard, mouse, Ethernet cable

Installation of Ubuntu on a Raspberry Pi

Raspbian is absolutely awesome, but the Raspberry Pi 2 has enough power to run a Ubuntu system and its desktop. Installing Ubuntu gives access to more packages, but works on the edge of the Raspberry Pis computing power and runs less robust then Raspbian.
Thanks to Ryan Finnie and the Ubuntu community for building the Raspberry Pi Ubuntu image and the comprehensive installation tutorial summarized in here!

Download Ubuntu
Download the newest Ubuntu image for the Raspberry Pi and unzip it. Install the image on an SD card with at least 8Gb like explained in the Raspbian image installation tutorial, but with the Ubuntu image file instead. Insert the SD card into the Raspberry Pi, connect it to a router or a host computer with a shared wired connection over Ethernet and boot; the login name and password are ubuntu.

Change the keyboard layout
Because Ubuntu does not come with raspi-config, some configurations need to be done manually. To change the keyboard layout, enter

and choose the appropriate region.

Resize the partition
The main partition needs to be deleted and recreated. This could be done with

and pressing (d, enter, 2, enter), then (n, enter, p, enter, 2, enter, enter, enter) and finally (w, enter) in fdisk. Now, reboot and resize the partition with

Update Ubuntu
Then, update the Ubuntu packages with

Configure ssh over Ethernet
For ssh access, the openssh-server package is required:

After that, find the Raspberry Pis IP address by entering

With the address noted, it’s possible to log in via ssh; exchanging SSH keys makes that more comfortable. Keep in mind that the login name is ubuntu instead of pi! The password is ubuntu, too.

Install a Ubuntu Desktop
Ubuntu Desktops come in the flavors lubuntu, kubuntu and xubuntu. Herein, the installation of kubuntu is shown; use lubuntu or xubuntu instead if preferred. Install the desktop with

The kubuntu Desktop package is larger than 1Gb; the installation process gives enough time to watch a movie or learn chinese…

Booting behaviour
For disabling the automated boot into desktop, create a file lightdm.override with

and enter the word

To reenable booting into the desktop, delete the file with

The desktop can be started from the command line with

To log into the terminal automatically, open tty1.conf with sudo nano -w /etc/init/tty1.conf and replace the line


Create a swap partition
The Raspberry Pi 2 has 1Gb of RAM; to tackle the massive Ubuntu, installing a swap partition is a good thing. Type in

Hardware accleration
Window moving and scrolling can be improved with hardware accleration. Install fbturbo with

, then open xorg.con with sudo nano /etc/X11/xorg.conf and enter

Luakit as browser
The high memory demand of the Ubuntu desktop nearly mandates the use of the ultra-leightweight LuaKit browser.

Optional: setup camera
The camera module has to be installed manually like shown in this tutorial.

GPIO Installation
In case the module for accessing the pins, GPIO, was not preinstalled, it can be installed easily with

Remote access with SSH: http://www.knight-of-pi.org/remote-control-your-raspberry-pi/
SSH key exchange: http://www.knight-of-pi.org/password-free-login-exchange-ssh-keys
Ryan Finnie - Ubuntu installation: http://www.finnie.org/2015/02/16/raspberry-pi-2-update-ubuntu-14-04-image-available/
Ubuntu on Raspberry Pi tutorial: https://wiki.ubuntu.com/ARM/RaspberryPi
Ubuntu image download: https://wiki.ubuntu.com/ARM/RaspberryPi
LuaKit browser tutorial: http://www.knight-of-pi.org/luakit-a-ultra-lightweight-browser-with-good-video-support/
Linux.com on swap partitions: https://www.linux.com/news/software/applications/8208-all-about-linux-swap-space
LuaKit browser tutorial: http://www.knight-of-pi.org/luakit-a-ultra-lightweight-browser-with-good-video-support/
Ubuntu camera installation tutorial: http://www.knight-of-pi.org/installing-the-camera-module-for-ubuntu/
Tutorial: Burn a disk image to a SD card: http://www.knight-of-pi.org/installation/
Raspbian Linux: http://www.raspbian.org

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.


Time limit is exhausted. Please reload CAPTCHA.