An introduction to downloading software with Flatpak

0


[ad_1]

Linux newbies will enjoy it as they can install packages while saving time and effort. Canonical, the parent company of Ubuntu, was the first to implement Snaps, a cross-distribution dependency-free software.

With Snap came Flatpak, another universal packaging system, written in C. Considered a package management utility, it allows a user to install and run applications in an isolated environment.

Basic terminologies

Like Snap, Flatpak aims to simplify software management on Linux distributions. Here are some common terminologies to know:

  • Flatpak: This is a system used to build, distribute, and run sandboxed desktop applications on Linux.
  • Duration: Runtimes are also called platforms because they work as integrated platforms to provide the basic utilities needed to run a Flatpak application.
  • Flatpack application: These are applications that a user can install using the dish command on their computer.

Benefits of using Flatpak

  • Universality: Flatpak, as a utility service manager, allows a user to install and run applications virtually on almost any Linux workstation. This will include all non-GNU distributions, read-only operating systems, distributions without systemd or other architectures.
  • Adapted to innovation: Flatpak encourages distribution managers to help developers focus on their innovation goals.
  • Stability: Breaks in an application do not break the system. This is because the Flatpak runtimes are contained and do not interfere with the operation of the system.
  • Installation without root: You don’t need elevated privileges when installing a Flatpak application / runtime.
  • Sandbox applications: One of the main goals of Flatpak is to improve system security by isolating applications from each other. Applications are sandboxed and run in separate silos.

Related: A Beginner’s Guide to Software Repositories in Ubuntu

Installing Flatpak on Linux distributions

There are different ways to install Flatpak, depending on the Linux distribution you are using.

Installing the Flatpak is a two-step process. The first step includes installing Flatpak through a package manager. The second step is to add Flatpak’s Flathub repository, from which you can install various applications.

Here’s how to install the package on different Linux distributions:

On Ubuntu and Mint

By default, Flatpak supports Ubuntu 18.04, Mint 19.3 and their later versions. You can install the package on Ubuntu and Linux Mint using APT:

sudo apt install flatpak

On Debian and Debian-based distributions

To install Flatpak on Debian based distributions like Elementary and Zorin, you need to add a PPA to your system before downloading the package:

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

You can also use the commands mentioned above to install Flatpak on Ubuntu.

On Red Hat and Fedora

To install on RHEL-based distributions such as Fedora and CentOS, run this command:

sudo dnf install flatpak

Alternatively, you can also use the YUM package manager:

sudo yum install flatpak

On OpenSUSE

Run the following command to install Flatpak on OpenSUSE:

sudo zypper install flatpak

On ArchLinux / Manjaro

Finally, to install the package on Arch Linux and its derived distributions, run the following command:

sudo pacman -S flatpak

Related: Flathub vs Snap Store: The Best Sites to Download Linux Apps

Adding the Flathub repository on Linux

The next step is to add Flatpak’s repository, Flathub, so that you can download and install apps from one of its most popular and used repositories.

To add the repository on Linux, run this command:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

How to use Flatpak on Linux

Using Flatpak is quite similar to using other package managers in Linux. You can find and install apps from the Flathub repository using the Flatpak command line tool.

Find apps on Flathub

Before you jump in to install the apps, you can check if a certain app is available in the repository. The default format for this command is:

flatpak search application-name

For example, let’s find Spotify and install it if it’s available.

flatpak search spotify

The resulting values ​​display the application ID, version, branch and remotes as well as a description of the software.

Install packages using Flatpak

The basic syntax for installing applications using Flatpak is:

flatpak install remotes applicationID

For example, to install Spotify, you can use:

flatpak install flathub com.spotify.Client

Launch an application

Use the following command format to launch an application:

flatpak run applicationID

For example:

flatpak run com.spotify.Client

This will eventually launch the Spotify app on your system.

List installed Flatpak packages

Go further. For a list of all Flatpak packages installed on your system:

flatpak list

Update installed packages

To update the Flatpak packages in your system, run:

flatpak update

If all the packages are already up to date, there will be no further changes after running the aforementioned command.

Uninstall the software using Flatpak

If you have installed an app and no longer want to keep it, you can uninstall it successfully using the uninstall method. The default command syntax is:

flatpak uninstall applicationID

Since we just installed Spotify, try uninstalling the app by typing:

flatpak uninstall com.spotify.Client

Enabling the GNOME Repository

Just like Flathub, the GNOME repository contains all of the major GNOME applications. The central repository itself has two versions: stable and nightly.

Add the GNOME stable repository

Use wget to download the GPG keys from the repository:

wget https://sdk.gnome.org/keys/gnome-sdk.gpg

Add the GNOME Flatpak repository to your system using remote add:

sudo flatpak remote-add --gpg-import=gnome-sdk.gpg --if-not-exists gnome-apps https://sdk.gnome.org/repo-apps/

To install the nightly version instead, run the following commands:

wget https://sdk.gnome.org/nightly/keys/nightly.gpg
sudo flatpak remote-add --gpg-import=nightly.gpg --if-not-exists gnome-nightly-apps https://sdk.gnome.org/nightly/repo-apps/

List remote repositories

To list all configured remote repositories:

flatpak remotes

The above command will list the repositories you have added to your system. It will also be displayed if the repository is a system-wide installation or specific to only a few users.

Delete a Flatpak repository

The basic syntax for deleting a repository is:

sudo flatpak remote-delete remote-name

…or remote-name is the name of the remote repository.

For example, to remove the Flathub repository from your system:

sudo flatpak remote-delete flathub

Repair the Flatpak installation

Use the repair command to repair the installation of Flatpak on your system:

sudo flatpak repair

The command takes a little while to run, so be patient and wait for it to run completely.

Kill a Flatpak process

To kill a Flatpak process, first check which processes are running:

sudo flatpak ps

To kill a process:

sudo flatpak kill applicationID

To check if the system killed the process successfully:

sudo flatpak ps

Related: How to Display Process Information on Linux Using the Ps Command

Getting the most out of Flatpak controls

As a beginner, you will probably feel overwhelmed by the various terminologies, jargon, and tons of commands available in Linux distributions. However, Flatpak is here to make your life easier by letting you install apps securely.

If you’re new to it, it’s best to explore the different features slowly and steadily as you understand the different nuances available in the distros. If you don’t want to use the command line at all, consider switching to Snap and Snap Store to install packages on Linux.


Snap Store Linux

Everything you need to know about Snap and Snap Store

Burdened by the steep learning curve of command line package managers? Get started today with Snap and Snap Store.

Read more


About the Author

.

[ad_2]

Share.

Leave A Reply