Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

flatpak

Install, update and run (mostly graphical) applications in a sandbox, from Flatpak remotes like Flathub.

Niveau
RHCSA-examen
Groep
Softwarepakketten
Root nodig
Voor wijzigingen
Pakket
flatpak

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

Wat het doet

Flatpak apps come with their own runtime, so they do not depend on the RPM packages of the system, and they run in a sandbox with limited access. That is good for desktop apps, not for server software.

Apps come from remotes (Flatpak repositories). Installs are system-wide (as root, --system, default) or per user (--user). App IDs look like org.gimp.GIMP.

Zo schrijf je het

flatpak [OPTION]... COMMAND [ARGUMENT]...

Belangrijkste delen

remote-add NAME URL
Add a remote (--if-not-exists).
remote-delete NAME
Remove a remote.
remote-modify NAME
Change a remote (enable, disable, priority).
remotes
List the remotes.
remote-ls [NAME]
List what a remote offers (--app, --updates).
remote-info NAME REF
Details of a remote app.
search TEXT
Search apps in the remotes.
install [REMOTE] REF
Install an app or runtime.
update [REF]
Update apps and runtimes.
uninstall REF
Remove an app (--unused = old runtimes).
list
Installed apps and runtimes (--app, --runtime).
info REF
Details of an installed app.
run APP
Start an app.
ps
Running sandboxes.
kill INSTANCE
Stop a running app.
override APP
Change the sandbox permissions of an app.
permissions
Show stored permissions.
history
Show past changes.
repair
Fix a broken installation.
mask, pin
Stop updates of a ref / keep a runtime.
config
Show or change settings (like languages).
make-current, enter, document-*, build*
Other and developer commands.

Opties 19

Meest gebruikt

--user
Work on the per-user installation.
--system
Work on the system installation (default).
--installation NAME
Work on another installation.
-y, --assumeyes
Answer yes.
--noninteractive
No questions, little output (scripts).
--if-not-exists
With remote-add: no error when it exists.
--app
With list/remote-ls/update: only apps.
--runtime
Only runtimes.
--columns=LIST
Choose output columns (like application,version).
--from FILE
Install from a .flatpakref file.
--reinstall
Reinstall if installed.
--or-update
With install: update if installed.
--no-deps
Do not install dependencies.
--unused
With uninstall: remove runtimes nothing uses.
--delete-data
With uninstall: also remove the app data.
-v, --verbose
More output.
--ostree-verbose
Debug output of OSTree.
--version
Show the version.
-h, --help
Show help.

Voorbeelden 11

$ als gewone gebruiker# als root (of met sudo)

  1. 1Install Flatpak

    dnf install -y flatpak

    On a desktop system it is often installed.

  2. 2Add the Flathub remote

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

    System-wide remote.

  3. 3Add the Red Hat remote

    flatpak remote-add --if-not-exists rhel https://flatpaks.redhat.io/rhel.flatpakrepo

    Apps built by Red Hat (needs a registered system / Red Hat login).

  4. 4List remotes and their apps

    flatpak remotes
    flatpak remote-ls flathub --app | head

    What can be installed.

  5. 5Search and install an app

    flatpak search gimp
    flatpak install -y flathub org.gimp.GIMP

    Runtimes come too.

  6. 6Install only for one user

    flatpak install --user -y flathub org.mozilla.firefox

    No root needed; only this user has it.

  7. 7Run, list and update

    flatpak run org.gimp.GIMP
    flatpak list --app
    flatpak update -y

    Updates all apps and runtimes.

  8. 8Remove an app and old runtimes

    flatpak uninstall -y org.gimp.GIMP
    flatpak uninstall --unused -y

    Frees disk space.

  9. 9Check the sandbox permissions (security)

    flatpak info --show-permissions org.mozilla.firefox

    Shows file system, network and device access.

  10. 10Take away home folder access

    flatpak override --nofilesystem=home org.mozilla.firefox

    Tighter sandbox.

  11. 11See running apps

    flatpak ps

    Instance, PID and app ID.

Let op

  • Flatpak is for desktop apps. Install server software with dnf.
  • A user installation is not visible for other users.

Bestanden

/var/lib/flatpak/
System installation.
~/.local/share/flatpak/
User installation.
~/.var/app/
App data of the user.

Exitcodes

0Done.
1Error.