install ubuntu core on raspberry pi

Getting Started with Ubuntu Core on Raspberry Pi

You may have noticed that Ubuntu Core is now listed in Raspberry Pi Imager. But what are the differences between other versions (like Ubuntu Server)? Should you use it for your projects? This guide will answer all your questions about it.

Ubuntu Core is a lightweight, minimal version of Ubuntu designed for Internet of Things (IoT) devices and embedded systems. For Raspberry Pi users, it provides a secure, up-to-date platform that simplifies the management and deployment of applications using Snaps.

In this post, I’ll guide you through its key use cases, highlight the differences between Ubuntu Core and Ubuntu Server, and show you how to install it on a Raspberry Pi.

If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!

Want the best experience? Become a premium member for ad-free browsing, access exclusive content, and ask questions in our private forums. Your membership helps support the site!

What is Ubuntu Core?

Ubuntu Core is a minimal, containerized version of the Ubuntu operating system. It uses snaps, a universal packaging format, to simplify software deployments and keep everything secure and reliable.

The folks at Canonical (the team behind Ubuntu) came up with Ubuntu Core to fill a gap in the market for a system that would be tailored for the Internet of Things (IoT) and embedded devices (like the Raspberry Pi).

It’s a minimalistic version of the Ubuntu OS but designed to meet the specific needs of modern connected devices. One unique feature of Ubuntu Core is the use of Snaps.

A Snap is a universal package format developed by Canonical and first released in 2014. Unlike traditional packages, Snaps are self-contained and include all the dependencies an application needs.

This makes them distribution-independent, meaning they can work across different Linux distributions without modification.

With Ubuntu Core, snaps serve as self-contained packages that bundle everything a program needs to run—making it lightweight, secure, and easy to manage. This approach keeps devices safe and up-to-date with minimal effort.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Use Cases for Ubuntu Core

Up to this point, I believe you have a good idea about Ubuntu Core and how it works. But you might think: Ubuntu Core is not the only flavor supporting Snaps. Almost all Debian-based distributions support Snap packages.

So, in what scenarios would Ubuntu Core be the perfect choice? Well, think of Ubuntu Core as a streamlined, no-fuss version of Ubuntu that’s perfect for single-purpose projects.

Let’s look at a simple example – you want to set up a Home Security Camera with the MotionEye Snap package. Why would you choose Ubuntu Core and not Raspberry Pi OS, Ubuntu Server, or any other Linux distribution?

  • Lightweight and focused: Just like the name suggests, Ubuntu core is stripped down to the “core”. This means your system doesn’t come with unnecessary apps or services that could slow it down. Also, Ubuntu Core doesn’t come with a Desktop Interface, which consumes a lot of system resources.

    Even though other distributions like Raspberry Pi OS or Ubuntu Server are powerful and versatile, they come with so many features that you wouldn’t need for a small project.
  • Security and Stability: Almost all Linux distributions are known for being highly secure. However, there is one interesting feature about Ubuntu Core.

    Other than using Snaps which are secure and easy to manage, Ubuntu Core’s design ensures that if something goes wrong during an update, the system can roll back to a previous, working state without manual intervention. Additionally, applications can be updated independently of the operating system.

    According to their official page, “Updates are transactional, which means that they are either 100% successful or they don’t get installed at all.

    This is not the same case with other distributions. For example, if you are performing a critical package update on the Ubuntu Server and the update stops midway, the system can become unstable or even crash.

With that in mind, let’s explore some Raspberry Pi projects you may have previously developed with other Linux distributions, but that would be even better when done with Ubuntu Core.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Home Automation Hub

If you have several smart devices in your home such as lights, thermostats, security cameras, door locks, and more, you will need a central device or software platform that connects and controls them – a home automation hub.

There are several home automation platforms available as a Snap package that you can install on your Ubuntu Core, they include platforms like Home Assistant or OpenHAB.

sudo snap install home-assistant
sudo snap install openhab

Once done, follow the setup guides for Home Assistant or OpenHAB to integrate your smart devices. These platforms will provide a web interface you can access from your laptop or phone to manage and control your devices.

If you’re new to the Linux command line, this article will give you the most important Linux commands to know, plus a free downloadable cheat sheet to keep handy.

Network Attached Storage (NAS)

If you want to share some files over a network to be accessed by your friends or family, the best option would be to set up a Network Attached Storage using your Raspberry Pi. We already have a tutorial that shows you how to set up OpenMediaVault on Raspberry Pi OS Lite.

However, Ubuntu Core would be the best option for such a project since you probably won’t use the Raspberry Pi for other services. One popular NAS snap that you can use is NextCloud.

sudo snap install nextcloud

After a successful setup, you will get a web interface that you can access via phone or laptop to manage files, set up user access, and synchronize with other devices.

A word about the Ubuntu Core Brand Store

Now, this would be only useful to organizations or companies that deploy devices running Ubuntu Core, such as IoT devices, and industrial machines. If you are looking forward to using Ubuntu Core only for personal projects, a Brand store would not be a necessity.

A Brand Store is a private, customized version of the Snap Store that is exclusive to a specific organization.

It is like having your private app store for your devices. Imagine you’re a company that makes smart home gadgets, like security cameras or thermostats, and you want to ensure that the software on all your devices is up-to-date and secure. With a Brand Store, you can create a custom version of the Snap Store just for your products.

A Brand Store is not free. It is a paid service, offered by Canonical, as part of their enterprise solutions for Ubuntu Core. The cost depends on the organization’s needs, including the number of devices, the level of support required, and any additional customization or integration services.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

If you are looking for exclusive tutorials, I post a new course each month, available for premium members only. Join the community to get access to all of them right now!

Getting Started with Ubuntu Core on the Raspberry Pi

In this section, I will give you a brief step-by-step guide to installing Ubuntu Core on a Raspberry Pi.

Set Up Your Ubuntu SSO Account

Before starting, ensure you have an Ubuntu Single Sign-On (SSO) account. This account will be crucial for managing your device remotely and accessing various Ubuntu services.

If you don’t have one, head to the Ubuntu SSO page and create an account—it only takes a few minutes.

Flash Ubuntu Core to SD Card

The next step is flashing the Ubuntu Cpre image to the SD card. I highly recommend using the Raspberry Pi Imager utility. It is available for various platforms including macOS, Windows, and Linux.

Launch Raspberry Pi Imager from your applications menu and fill in the various options:

  • Choose Device: Here, select the Raspberry Pi model you are using. In my case, I am using a Raspberry Pi 4.
  • Choose OS: Other General Purpose OS -> Ubuntu -> Ubuntu Core
  • Choose Storage: Select the SD card that you want to flash.

First boot with Ubuntu Core

After successfully writing the Ubuntu Core image to the SD card, eject the SD card from your PC and insert it into the Raspberry Pi. Connect a keyboard and a monitor to the Raspberry Pi as you will need them for initial configuration.

Download Your Essential Linux Commands Guide!
It's a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now

Once done, connect the power supply to the Raspberry to start the booting process. After a few seconds, you will see the prompt “Press enter to configure.”

Press “Enter” and you will see a screen similar to the image below.

Press “Enter” again to start configuring the network.

Configure Networking

With networking, you can choose to use either Ethernet or Wi-Fi. I always opt for Ethernet since my Raspberry Pi is connected to an Ethernet cable.

Use the Tab keys, arrow keys, and Enter keys to navigate this interface.

Once done, select “Done” at the bottom and hit Enter.

Connect the Ubuntu SSO account

Next, you will see a prompt to add your Ubuntu SSO account. Type the email you used to create your account and press Enter to proceed.

If you get an error like “Creating user failed: no SSH keys found“, proceed to the next step below.

SSH Key Generation & Configuration

Ubuntu Core requires an SSH key for secure remote access. If you don’t have an SSH key pair, generate one using the ssh-keygen command on your local machine. Follow the steps below:

  • Generate SSH keys by running the command below.
    ssh-keygen -t rsa

The command above will generate two files:

  • Private Key: This key is stored on your local machine, typically in the ~/.ssh/ directory, in a file named id_rsa.
  • Public Key: The corresponding public key is stored in the same directory, in a file named id_rsa.pub.

Now, you have to add the public key to your Ubuntu SSO account, allowing you to connect to your Pi without a password. Open the public key using a text editor, copy all the contents, and paste them into the Ubuntu SSO account.

Once done, click the “Import SSH key.” Return to the Raspberry Pi and add your Ubuntu SSO email again. This time, you shouldn’t get an error. If you encounter any errors, let us know in the comments below.

Connecting to Device (Failure & Success)

Now try accessing your Raspberry Pi via SSH using the connection details provided in the previous step. In my case, I didn’t encounter any issues. However, in some cases, you might see an error like “Unprivileged users are not permitted to log in anymore.

If you encounter this error, reboot your Raspberry several times and you should be good to go.

Install applications with Snap

With everything set up, you’re ready to install applications. Ubuntu Core uses Snaps, which are self-contained packages that are easy to install and update. To install a snap, simply use the command syntax below:

snap install <application-name>

For example, the command below will set up an MQTT broker on your Pi in seconds.

snap install mosquitto

Whenever you’re ready, here are other ways I can help you:

The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.

Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.

The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.

Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.

You can also find all my recommendations for tools and hardware on this page.

How would you rate this article?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Spread the word!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Similar Posts