Ubuntu 24.04 LTS is a stable and reliable release, one of the most commonly preferred choices for a Linux desktop. However, it differs from many Linux distributions as it primarily uses Snapโa universal distro-agnostic format for software development and distribution created by Canonical, the makers of Ubuntu.
At the same time, Flatpak is gaining momentum, with thousands of apps available on FlatHub and millions of downloads. In fact, nearly every desktop Linux app offers its own Flatpak version in addition to its native package format, thus reaching a huge audience of users.
So, by adding Flatpak support to your Ubuntu 24.04 LTS system, you can greatly enhance its functionality and access a wide range of software applications.
This guide will show you how to effortlessly add Flatpak support to Ubuntu 24.04 LTS and start installing Flatpak apps in just a few minutes. It’s easier than you expect. Let’s get started.
Enabling Flatpak in Ubuntu 24.04 LTS
Before we start, if you have any concerns, both Snap and Flatpak formats will coexist seamlessly on your Ubuntu 24.04 system. You can install applications in either one, and they will work smoothly.
Now, we’ll add Flatpak support, which is really simple and requires just a single command. Open the Terminal app and run the following:
sudo apt install flatpak
Code language: Bash (bash)
And there you go! Just like that, Flatpak is now installed on your Ubuntu 24.04 system. How much easier could it be?
I know you’re eager to start installing Flatpak apps, but I’d like to ask for just a little more patience because we need to do one more small thing. Here it is.
Add the FlatHub Repository
Technically, you are all set to install and run Flatpak apps at the moment. However, this requires downloading a “.flatpakref” file locally first, which is not the most convenient option.
To simplify and enhance the user experience, we should add a repository that the flatpak
command can use to search, install, update, and manage Flatpak packages. In the Linux ecosystem, the main one is FlatHub, which hosts thousands of ready-to-install Flatpak apps.
Adding it to our Ubuntu 24.04 system is again more than easy. Just run:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Code language: Bash (bash)
You will be asked for your password. Enter it, and thatโs it!
I highly recommend restarting your system at this point before proceeding further and installing any Flatpak apps. If you install one now without rebooting, its icon won’t automatically appear in Ubuntu’s Dash. This is because the system needs to reload certain filesystem paths, which happens when you reboot.
Having done that, let’s move on to the most exciting part.
Install Flatpak App on Ubuntu 24.04 LTS
To install a Flatpak app, you can go in three different ways.
Install with the Help of a Browser
Here’s how you can get started with the easiest one:
- Open your web browser and go to flathub.org.
- Use the search box to find the app you need, for example, Spotify, and press “Enter.”
- On the results page, click on the app you want to install.
On the app page, click the down arrow on the right side of the button. Then, copy the “flatpak installโฆ” line from the modal window that appears.
Now open the Terminal application, paste it, and execute the command.
flatpak install flathub com.spotify.Client
Code language: Bash (bash)
Here we go! Open your app list, start your newly installed Flatpak one, and enjoy!
You can also launch the Flatpak app directly using the command line. As mentioned earlier, the installation instructions include a “Run” section that tells you how to start the application.
flatpak run com.spotify.Client
Code language: Bash (bash)
Just enter this command, and the app will launch. However, starting the app from the graphical app launcher is generally easier and more convenient.
Installing by Downloading the โ.flatpakrefโ File
Another way to install a Flatpak application is through its installation “.flatpakref” file. But before proceeding further, let’s say a few words about it.
As the name suggests, it is a reference file used by Flatpak, containing metadata and necessary information for installing a specific application. Hereโs what typically goes into it:
- URL: The location from where the Flatpak runtime or application can be downloaded.
- Runtime: Information about the runtime environment required by the application.
- Application ID: A unique identifier for the application.
- Branch: Specifies the version of the app or runtime.
- Title and Description: Human-readable details about the application.
- GPG keys: Used to verify the integrity and origin of the package.
To install an application, start by obtaining the “.flatpakref” file. Visit flathub.org, search for the application you need, and click the “Install” button on its page. This action will automatically download the “.flatpakref” locally.
To install it, open the Terminal application and run the command below, specifying the full path to the “.flatpakref” file as the argument.
flatpak install ./Downloads/com.spotify.Client.flatpakref
Code language: Bash (bash)
Installing Flatpak Using Only the Command Line
The last method for installing Flatpak exclusively uses the command line. It’s the quickest option because it avoids juggling multiple applications, copying and pasting commands, or downloading anything beforehand.
Open the terminal, then type “flatpak search,” followed by the application name you want to install. When you see it listed, copy the complete name as shown under the “Application ID” column.
Finally, just install it by running:
flatpak install com.spotify.Client
Code language: Bash (bash)
Basic Flatpak Commands
Flatpak provides numerous commands to help you manage its applications. To learn more about these, we recommend visiting our dedicated guide on the subject. However, here’s a list of the key ones for quick reference.
Search for an Application
flatpak search [app-name]
Code language: Bash (bash)
Install a Flatpak
flatpak install [app-id]
Code language: Bash (bash)
List Installed Flatpaks
flatpak list
Code language: Bash (bash)
Update Flatpaks
flatpak update
Code language: Bash (bash)
Run a Flatpak Application
flatpak run [app-id]
Code language: Bash (bash)
Remove a Flatpak
flatpak uninstall [app-id]
Code language: Bash (bash)
Info on a Flatpak
flatpak info [app-id]
Code language: Bash (bash)
Conclusion
In this guide, we’ve shown you how to add Flatpak support to your Ubuntu 24.04 system and start installing applications quickly and seamlessly, taking advantage of the huge choice the Flatpak ecosystem offers.
Once you’re comfortable using Flatpak, consider installing the Flatseal app. It provides detailed insights into your Flatpak app permissions via an easy-to-use graphical interface, enhancing the security of your Linux system.
For additional help or useful information, check the official Flatpak documentation. Thanks for your time! If you have any questions, please leave them in the comments section below.