A beginner’s guide on how to install Flatpak in Ubuntu and other Linux distributions.
What is Flatpak?
Flatpak is the new way of distributing apps across the Linux universe, irrespective of the distribution. This cross-distro application distribution and deployment framework enable developers to Flatpak setup for apps for all major distributions.
The major hurdles in any Linux app distribution are dependencies, and Flatpak covers that. Flatpak builds bundles the dependencies for the respective apps, and end-users need not worry about it.
With the growing trends, many app developers are now providing the Flatpak builds along with traditional packages, e.g. *.deb, etc. With a quick setup for your distributions, you can be ready to explore the world of Flatpak apps. All the major Flatpak apps are available on flathub.org. You can search and just click a button, you can install the Flatpak apps. Here’s how to set it up for Ubuntu and other Linux distributions.
How to setup Flatpak in Ubuntu
- For Ubuntu 18.10 (Cosmic Cuttlefish), use the following command to install Flatpak (that includes Ubuntu 22.04 as well).
sudo apt install flatpak
If you are using an older version of Ubuntu, use the following repo.
sudo add-apt-repository ppa:alexlarsson/flatpak sudo apt update sudo apt install flatpak
- The second step is optional if you want to install Flatpak apps via the browser. Enable Ubuntu Software to recognize Flatpak apps and their installations. Run the below commands from the terminal and provide the password when prompted.
sudo apt install gnome-software-plugin-flatpak
- Add the Flathub repository where all the Flatpak apps reside. Run the below commands from the terminal.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Install in Other Linux Distributions
Flatpak is available to install almost all possible distributions. Here’s a quick list of commands you can run from the terminal in all the distros.
|Linux distro name||Instructions or commands to set up Flatpak|
|AlmaLinux||Enabled by default. No action is required.|
|Alpine Linux||Run the following commands:|
|Arch Linux||Run the following commands:|
|CentOS||Enabled by default. No action is required.|
|Clear Linux||Enabled by default. No action is required.|
|Debian||Run the following commands:|
|Deepin OS||Run the following commands:|
|elementary OS||Enabled by default. No action is required.|
|Endeavour OS||Enabled by default. No action is required.|
|Endless OS||Enabled by default. No action is required.|
|Fedora Linux||Flatpak is installed by default. All you need to do is to install the Flathub repo:|
And finally, reboot your system before installing the Flatpak app.
|Gentoo||Run the following commands:|
|KDE Neon||Enabled by default. No action is required.|
|Kubuntu||Run the following commands:|
|Linux Mint||Enabled by default. No action is required.|
|Mageia||Run the following commands:|
|Manjaro Linux (Arch-based)||Installed by default since Manjaro 20 and higher.|
Make sure it is enabled in the below navigation:
Software Manager > Preferences > Flatpak Tab > Enable Flatpak Support
Reboot your system
|MX Linux||Enabled by default. No action is required.|
|Nix OS||Open |
And then run the followings:
|openSUSE Leap and Tumbleweed||Flatpak is installed by default. All you need to do is to install the Flathub repo:|
And finally, reboot your system before installing the Flatpak apps.
|Pop OS||Enabled by default. No action is required.|
|Raspberry Pi OS||Run the following commands:|
|Red Hat Enterprise Linux (RHEL)|
|Solus||Run the following commands:|
|Void Linux||Run the following commands:|
|Zorin OS||Enabled by default. No action is required.|
Once installation is completed and reboot is done, you can proceed with installing some cool Flatpak apps via the below steps.
How to Install Flatpak Apps in Ubuntu and Other Linux
There are two ways you can install Flatpak apps. Firstly via command line, which I recommend. And second is the browser method.
I recommend using the command line because it is faster and easier.
Using the command line (recommended)
The sample command to install any Flatpak app is available at the bottom section of the Flathub app page. A sample command is below:
flatpak install org.gimp.GIMP
Change the above “org.gimp.GIMP” for your application. Remember, this is case-sensitive.
Using the graphical method via browser
- Go to Flathub.
- Search for any apps you want to install.
- Click install after selecting your desired app.
- Click Ok when it prompts you to start the installation via Software.
- The Software will open and wait till the installation finishes.
In this tutorial, I have explained how you can easily set up Flatpak and install apps from Flathub. Moreover, Flatpak applications are a great way to easily install and manage them. In my opinion, Flatpak will eventually dominate Snap and AppImage in the future.
You may want to check out our other articles about Flatpak.