Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install and Use Flatpak on Linux - DesignLinux

Nov 27 2020
designlinux 0 Comments

In Linux, there are many avenues for installing a software package. You can use the package managers such as APT for Debian-based distributions and YUM for RHEL-based distributions. If the packages are not available in the official repositories, you can use the available PPAs ( For Debian distributions ) or install them using DEB or RPM packages. If you are not a fan of using the terminal, the Software Center can give you a much easier way of installing applications. If everything fails, you still have an option of building from source.

Be that as it may, a few challenges exist. The software center may not always have the application you are looking for and installing from PPAs may yield errors or compatibility issues. Additionally, building from source requires a higher level of expertise and is not a beginner-friendly way for newcomers to Linux.

In light of such challenges, a universal way of installing packages comes highly recommended in order to save time and avoid errors arising from compatibility issues. Canonical was the first to implement such an idea in the form of snap packages. Snaps are cross-distribution, containerized, and dependency-free software packages that simplify the installation of software applications.

Along with snaps, came flatpak, which is yet another universal packaging system.

Flatpaks

Written in C, a flatpak is a package management utility that allows users to install and run applications in a sandboxed or isolated environment. Just like snaps, flatpak aims at simplifying the management of software packages across various distributions. A single flatpak can be installed in any Linux distribution that supports Flatpaks without any modification.

How to Install Flatpak in Linux Distributions

In this guide, we focus on how you can install Flatpak and use it across various Linux distributions. Installing Flatpak is a 2-step procedure. First, you need to install Flatpak using your distribution’s package manager and later add the Flatpak repository ( Flathub ) from where applications will be installed.

Install Flatpak on Ubuntu and Mint

By default, Flatpak is supported on Ubuntu 18.04 and Mint 19.3 and later versions. You can confirm this by running the command:

$ sudo apt install flatpak
Install Flatpak in Ubuntu
Install Flatpak in Ubuntu

Install Flatpak on Debian and Debian-based Distros

For other Debian-based distributions such as Zorin, Elementary, and other distros, add the PPA shown and execute the command below:

$ sudo add-apt-repository ppa:alexlarsson/flatpak 
$ sudo apt update 
$ sudo apt install flatpak

Install Flatpak on RedHat and Fedora

For Fedora and RHEL/CentOS 8 run the command.

$ sudo dnf install flatpak

For earlier versions, RHEL/CentOS 7 use the yum package manager to install flatpak.

$ sudo yum install flatpak

Install Flatpak on OpenSUSE

To enable Flatpak on OpenSUSE invoke the command:

$ sudo zypper install flatpak

Install Flatpak on ArchLinux / Manjaro

Finally, to enable Flatpak on Arch Linux and its flavors, invoke the command:

$ sudo pacman -S flatpak

Once Flatpak is installed, the next step will be to enable Flatpak’s repository from where applications will be downloaded.

How to Add Flathub Repository in Linux

The next step will be to add Flatpak’s repository from where we will download and install applications. Here. we are adding Flathub since it’s the most popular and widely used repository.

To add Flathub to your system. run the command below.

$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Adding Flathub Repository
Adding Flathub Repository

How to Use Flatpak in Linux

Before installing an application from the repository, you can search for its availability on Flathub using the syntax:

$ flatpak search application name

For example, to search Flathub for Spotify, run the command:

$ flatpak search spotify

The results will give you the Application ID, Version, Branch, Remotes, and a brief description of the software application.

Search Apps in Flathub
Search Apps in Flathub

To install the application from the repository, use the syntax:

$ flatpak install [remotes] [Application ID]

In this case, to install Spotify, run the command

$ flatpak install flathub com.spotify.Client
Install Apps from Flathub
Install Apps from Flathub

To run a flatpak application, execute the command:

$ flatpak run [Application ID]

For example,

$ flatpak run com.spotify.Client

In my case, this had the effect of launching the Spotify application.

Run Flatpak Application
Run Flatpak Application

To list the flatpak packages residing on your system, run the command:

$ flatpak list
List Flatpak Applications
List Flatpak Applications

To uninstall an application, use the syntax:

$ flatpak uninstall [Application ID]

For example, to remove Spotify, run:

$ flatpak uninstall com.spotify.Client

To update all flatpak packages, run:

$ flatpak update

In my case, all flatpaks were up to date, so no changes were made.

Update Flatpak Applications
Update Flatpak Applications

Finally, to check the version of flatpak you are using, execute:

$ flatpak --version
Check Flatpak Version
Check Flatpak Version
Conclusion

Flatpak goes a long way in providing access to additional software for your system. This is made possible by the Flathub repository which contains a huge collection of flatpak applications.

Related

Tags: Fedora Tips, Flatpak, Linux Mint Tips, Ubuntu Tips

How to Install and Use Thonny Python IDE on Linux

Prev Post

How to Install Go in Ubuntu 20.04

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 0
  • 481
  • 612,660

DesignLinux.com © All rights reserved

Go to mobile version