How To Install Ubuntu Core On Raspberry Pi
Have you ever wanted an Ubuntu-powered server for under 60$? Thanks to Ubuntu Snappy Core you can get a stripped down, lean version of Ubuntu to run server-grade applications on Raspberry Pi with ease. Understand that though Snappy Core has “Ubuntu” in the title, that doesn’t mean it works like traditional Ubuntu. Instead, it runs entirely with Snappy packages. Users will not be able to do “sudo apt install xxx”, and etc. Here’s how you can install Ubuntu Core on Raspberry Pi
Note: Snappy Core supports other embedded devices besides the Pi line, such as the Orange Pi, Intel Joule and etc.
What Is Ubuntu Core?
Ubuntu Core is a minimal version of Ubuntu that does not have the core Debian base (apt/apt-get). This version of Ubuntu is ideal for Internet Of Things devices, cloud computers, and small devices such as the Raspberry Pi.
Due to the fact that Ubuntu Core is stripped down Ubuntu, it runs much lighter and requires a fewer resources. All packages and programs on the system are delivered in Snaps. This type of package delivery makes getting the latest software on Ubuntu Core a breeze.
Set Up
Create Account
Using Ubuntu Core requires an SSO account. Go to this page, and register. Logging into Ubuntu Snappy Core with your account will bind and register your account to the Pi.
Import SSH Key
After registering an account with Ubuntu, the next step is to import an SSH key, so that when you log into Ubuntu Core, SSH works correctly. If you’ve already got a Public SSH key, (located in ~/.ssh and ends in .pub) paste the contents of it on this page here.
Otherwise, read our tutorial on generating SSH keys. Only follow the part of the article that covers key generation. Ignore the section that goes over how to import the key. Instead, copy the contents of the id_rsa.pub located in ~/.ssh onto the Ubuntu page.
Create Installation Media
When you’ve imported your public SSH key, the next step is to create an installation medium. Download the latest version of Ubuntu Core for Raspberry Pi 2 or Raspberry Pi 3. Then, plug in a Micro SD card to your PC.
Burn the install medium with Etcher.
First Boot
Plug in the newly created Ubuntu Core Micro SD card into the Raspberry Pi. Additionally, plug in an HDMI cable, as well as a keyboard. As the Pi turns on, you’ll see a prompt on the screen. This prompt lets the user know that it is ready for configuration. Press the enter key to start the configuration process for Ubuntu Core.
Select “Start”. On the first page, you’ll need to configure the network connection for the Pi. Ubuntu Core supports connections for both Ethernet as well as wireless. Using the Pi 3 and need WiFi? Select “wlan0”, and go from there.
Configuration
Note: Pi 2 users, if you require WiFi you’ll need to have a USB wireless dongle available to plug in.
During network configuration, be sure to select “Use DHCPv4” if using IPv4. This option will automatically assign the device an IP address. Use Ipv6? Select “Use DHCPv6 “instead.
After configuring the network connection, Ubuntu Core will ask the user to enter an email address. Keep in mind that this is the email address that corresponds to the Ubuntu account made earlier. Enter it, then select “done”.
At attempted login, Ubuntu Core will let the user know that the device is registered to the email account entered and that it is possible to log in over SSH.
Copy the SSH command that it prints on the screen, and use it in a terminal on your Linux PC. Keep in mind that logging in requires the same SSH key applied earlier. Be sure that the key added to your Ubuntu account is also present on any PC used to log in. The file must be at ~/.ssh/id_rsa.pub
Using Ubuntu Core
After the initial setup, Ubuntu Core will load up a bare, terminal-based Ubuntu session. Log into your Ubuntu snappy core session on the Raspberry Pi via an SSH terminal on a remote PC. Alternatively, use the bare, terminal session directly from the Pi.
To log in, replace X and Y with the SSH information that Ubuntu Core printed on-screen during the initial configuration process.
ssh x@y
Keep in mind that Ubuntu core does not use Apt. To install software, you’ll need to interact with snap packages.
Want to turn your Pi into a NextCloud server? Try:
sudo snap install nextcloud
Interested in getting Docker running? Do:
sudo snap install docker
There are many different server-grade Snaps that can easily run on the Pi making it perfect for a cheap Linux server.
Note: Please understand that Ubuntu Core is not for traditional computing, and if you expect to have a traditional Ubuntu desktop, it’s best to install Ubuntu Mate for the Raspberry Pi. It provides a traditional, ARM-based Linux experience for Pi 2 and Pi 3.