Flatpak is a technology for building and distributing software applications in a cross-distribution and sandboxed manner. It provides a way for developers to package their applications and dependencies into a single bundle, called a “flatpak,” which can be easily installed and run on a wide range of Linux distributions.
The flatpak bundle includes everything the application needs to run, including the runtime (e.g. the specific version of the programming language or libraries), so the application can run consistently across different distributions. This is particularly useful for developers who want to ensure their application runs the same way on different Linux systems.
To use flatpak, users first need to install the flatpak runtime on their system. Once the runtime is installed, they can then install and run flatpak applications using the flatpak command-line tool. The applications are run in a sandboxed environment, which means that they are isolated from the rest of the system and cannot make any changes outside of their designated sandbox. Flatpak also provides a central repository for flatpak applications called Flathub, which allows users to easily discover and install new applications. Developers can also distribute their own flatpaks on their own website or other distribution channels.
flatpak Command Examples
1. Run an installed application:
# flatpak run name
2. Install an application from a remote source:
# flatpak install remote name
3. List all installed applications and runtimes:
# flatpak list
4. Update all installed applications and runtimes:
# flatpak update
5. Add a remote source:
# flatpak remote-add --if-not-exists remote_name remote_url
6. Remove an installed application:
# flatpak remove name
7. Remove all unused applications:
# flatpak remove --unused
8. Show information about an installed application:
# flatpak info name