If you’re looking for an easy way to install and manage applications on Linux without worrying about compatibility issues, Flatpak is a great solution. It allows you to run apps in a secure, sandboxed environment, ensuring better security and performance across different Linux distributions.
In this guide, we’ll explain what Flatpak is, how to install it on different Linux distributions, how to install apps using Flatpak, and how to manage your Flatpak applications. Let’s get started!
What is Flatpak?
Flatpak is a universal package management system that allows you to install and run applications on almost any Linux distribution. It eliminates dependency problems and ensures that applications work consistently across different systems.
Key Benefits of Flatpak:
- Cross-Distribution Support: Works on Ubuntu, Fedora, Arch Linux, openSUSE, and many other distributions.
- Sandboxed Environment: Apps run in isolation, reducing security risks.
- Direct Updates from Developers: You always get the latest versions of apps without waiting for your distribution to update them.
- Easy Installation: Apps can be installed and updated with simple commands.
Now, let’s move on to installing Flatpak on different Linux distributions.
Step 1: Check If Flatpak Is Already Installed
Some Linux distributions, like Fedora, come with Flatpak preinstalled. To check if your system already has Flatpak, open a terminal and type:
flatpak --version
If you see an output showing the Flatpak version, it means Flatpak is already installed. If not, follow the installation steps below.
Step 2: Install Flatpak on Your Linux Distribution
For Ubuntu & Debian-Based Distributions
Ubuntu and Debian don’t have Flatpak preinstalled, but you can install it easily with:
sudo apt update && sudo apt install flatpak -y
To enable Flatpak support in the GNOME Software Center (for graphical installations), install the Flatpak plugin:
sudo apt install gnome-software-plugin-flatpak -y
For Fedora
Fedora includes Flatpak by default. If you need to reinstall it, use:
sudo dnf install flatpak -y
For Arch Linux & Manjaro
On Arch-based distributions, install Flatpak with:
sudo pacman -S flatpak
For openSUSE
If you’re using openSUSE, install Flatpak by running:
sudo zypper install flatpak
For Other Linux Distributions
If Flatpak isn’t available in your package manager, you can install it manually using:
wget https://flathub.org/setup.sh -O flatpak-setup.sh
chmod +x flatpak-setup.sh
./flatpak-setup.sh
Step 3: Enable the Flathub Repository
Flathub is the main source for downloading Flatpak applications. To add Flathub to your system, run:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Restart your computer after adding Flathub:
reboot
Step 4: Install Applications Using Flatpak
Now that Flatpak is installed, you can start installing applications from Flathub.
To Install an Application:
Use this command:
flatpak install flathub <application-name>
For example, to install Firefox:
flatpak install flathub org.mozilla.firefox
To Search for Applications:
If you’re unsure about the exact name of an app, search for it using:
flatpak search <app-name>
Step 5: Running Applications Installed via Flatpak
To launch an app installed with Flatpak, use:
flatpak run <application-ID>
For example, to open Firefox:
flatpak run org.mozilla.firefox
Installed applications should also appear in your application menu.
Step 6: Updating and Uninstalling Flatpak Applications
To Update All Flatpak Apps:
flatpak update
To Uninstall an Application:
flatpak uninstall <application-ID>
For example, to uninstall Firefox:
flatpak uninstall org.mozilla.firefox
To Remove Unused Runtimes (Free Up Space):
flatpak uninstall --unused
Step 7: Managing Flatpak Permissions
Flatpak applications run in a secure, sandboxed environment, but sometimes you may need to grant extra permissions. A great tool for this is Flatseal.
To Install Flatseal:
flatpak install flathub com.github.tchx84.Flatseal
After installation, open Flatseal and adjust permissions as needed.
Popular Applications Available on Flatpak
Here are some useful apps you can install via Flatpak:
- Firefox –
org.mozilla.firefox
- LibreOffice –
org.libreoffice.LibreOffice
- GIMP (Image Editor) –
org.gimp.GIMP
- VLC Media Player –
org.videolan.VLC
- Spotify –
com.spotify.Client
- Discord –
com.discordapp.Discord
- Steam (Gaming Platform) –
com.valvesoftware.Steam
You can explore more apps on Flathub.
Troubleshooting Common Flatpak Issues
1. Flatpak Commands Not Found
- Restart your system:
reboot
- Check if Flatpak is installed:
flatpak --version
2. Application Not Launching
- Try running it from the terminal:
flatpak run <application-ID>
- Repair Flatpak apps:
flatpak repair
3. Running Low on Storage
- Remove unused runtimes:
flatpak uninstall --unused
Conclusion
Flatpak is a powerful tool that simplifies installing and managing Linux applications. It works across different distributions, provides better security through sandboxing, and ensures you always get the latest updates directly from developers.
Now that you have Flatpak installed and set up, you can explore thousands of applications on Flathub and enjoy a seamless Linux experience!
Leave a Reply