mirror of
https://github.com/foo-dogsquared/wiki.git
synced 2025-01-31 04:58:21 +00:00
38 lines
16 KiB
HTML
38 lines
16 KiB
HTML
|
<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width"/><meta charSet="utf-8"/><title>Command line: Flatpak</title><script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script><script id="MathJax-script" async="" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script><script type="text/x-mathjax-config">
|
||
|
MathJax = {
|
||
|
tex: {
|
||
|
inlineMath: [ ['$','$'], ['\(','\)'] ],
|
||
|
displayMath: [ ['$$','$$'], ['[',']'] ]
|
||
|
},
|
||
|
options = {
|
||
|
processHtmlClass = "math"
|
||
|
}
|
||
|
}
|
||
|
</script><meta name="next-head-count" content="6"/><link rel="preload" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" as="style"/><link rel="stylesheet" href="/wiki/_next/static/css/52fc2ba29703df73922c.css" data-n-g=""/><noscript data-n-css=""></noscript><link rel="preload" href="/wiki/_next/static/chunks/main-ae4733327bd95c4ac325.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/webpack-50bee04d1dc61f8adf5b.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/framework.9d524150d48315f49e80.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/commons.0e1c3f9aa780c2dfe9f0.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/_app-8e3d0c58a60ec788aa69.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/940643274e605e7596ecea1f2ff8d83317a3fb76.4841a16762f602a59f00.js" as="script"/><link rel="preload" href="/wiki/_next/static/chunks/pages/%5B%5B...slug%5D%5D-1aa198f87ede1cd0e1dc.js" as="script"/></head><body><div id="__next"><main><h1>Command line: Flatpak</h1><section class="post-metadata"><span>Date: <!-- -->2021-06-04 07:39:11 +08:00</span><span>Date modified: <!-- -->2021-11-08 20:12:02 +08:00</span></section><nav class="toc"><ol class="toc-level toc-level-1"><li class="toc-item toc-item-h1"><a href="/wiki/cli.flatpak#options" class="toc-link toc-link-h1">Options</a></li><li class="toc-item toc-item-h1"><a href="/wiki/cli.flatpak#subcommands" class="toc-link toc-link-h1">Subcommands</a></li><li class="toc-item toc-item-h1"><a href="/wiki/cli.flatpak#examples" class="toc-link toc-link-h1">Examples</a><ol class="toc-level toc-level-2"><li class="toc-item toc-item-h2"><a href="/wiki/cli.flatpak#basic-usage" class="toc-link toc-link-h2">Basic usage</a></li><li class="toc-item toc-item-h2"><a href="/wiki/cli.flatpak#package-installation-interface" class="toc-link toc-link-h2">Package installation interface</a></li><li class="toc-item toc-item-h2"><a href="/wiki/cli.flatpak#package-uninstallation-interface" class="toc-link toc-link-h2">Package uninstallation interface</a></li></ol></li></ol></nav><p>Flatpak is a cross-Linux-distro deployment system commonly used for packaging desktop applications.
|
||
|
</p><h1 id="options">Options</h1><p>Flatpak has a similar interface to Git being composed of subcommands with specific options.
|
||
|
</p><ul><li><p><code class="inline-verbatim">-v, --verbose</code> - just print more information
|
||
|
</p></li></ul><p>Most of the query-related subcommands (e.g., <code class="inline-verbatim">search</code>, <code class="inline-verbatim">list</code>) has the following options.
|
||
|
</p><ul><li><p><code class="inline-verbatim">--columns=${COLUMNS}</code> - print the columns listed; useful for extracting the information you want
|
||
|
you can find the related fields from the respective manual page
|
||
|
</p></li></ul><h1 id="subcommands">Subcommands</h1><ul><li><p><code class="inline-verbatim">info PACKAGE [BRANCH]</code> prints related information of the package.
|
||
|
</p><ul><li><p><code class="inline-verbatim">-M, --show-permissions</code> prints the permissions of the package in a INI-like format.
|
||
|
</p></li><li><p><code class="inline-verbatim">-m, --show-metadata</code> prints the metadata in a INI-like format.
|
||
|
</p></li></ul></li><li><p><code class="inline-verbatim">remote-ls [REMOTE]</code> lists all of the packages of the given remote.
|
||
|
</p><ul><li><p><code class="inline-verbatim">--app</code> only includes standalone applications.
|
||
|
</p></li><li><p><code class="inline-verbatim">--runtime</code> only lists runtimes.
|
||
|
</p></li></ul></li></ul><h1 id="examples">Examples</h1><p>Flatpak has a lot of stuff so we'll bring some examples to get started.
|
||
|
</p><h2 id="basic-usage">Basic usage</h2><p>Or at least how I think it would be for a starting user.
|
||
|
</p><pre class="src-block"><code class="language-shell">flatpak search ferdi
|
||
|
|
||
|
flatpak install ferdi
|
||
|
|
||
|
flatpak uninstall ferdi
|
||
|
</code></pre><h2 id="package-installation-interface">Package installation interface</h2><p><a href="/wiki/cli.fzf">fzf</a> is the star here.
|
||
|
</p><pre class="src-block"><code class="language-shell">flatpak search ${QUERY} --columns=application \
|
||
|
| fzf --multi --prompt "Choose Flatpak package(s) to install > " \
|
||
|
| xargs --replace="{}" flatpak install --noninteractive {}
|
||
|
</code></pre><h2 id="package-uninstallation-interface">Package uninstallation interface</h2><p>If there's one for installing packages, there's also one for removing them.
|
||
|
</p><pre class="src-block"><code class="language-shell">flatpak list ${QUERY} --columns=application \
|
||
|
| fzf --multi --prompt "Choose Flatpak package(s) to remove > " \
|
||
|
| xargs --replace="{}" flatpak uninstall --noninteractive {}
|
||
|
</code></pre></main></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"metadata":{"date":"\"2021-06-04 07:39:11 +08:00\"","date_modified":"\"2021-11-08 20:12:02 +08:00\"","language":"en","source":""},"title":"Command line: Flatpak","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"options"},"children":[{"type":"text","value":"Options"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/cli.flatpak#options"},"children":[{"type":"text","value":"Options"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"subcommands"},"children":[{"type":"text","value":"Subcommands"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/cli.flatpak#subcommands"},"children":[{"type":"text","value":"Subcommands"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"examples"},"children":[{"type":"text","value":"Examples"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/cli.flatpak#examples"},"children":[{"type":"text","value":"Examples"}]},{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-2"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h2","properties":{"id":"basic-usage"},"children":[{"type":"text","value":"Basic usage"}]}]},"properties":{"className":"toc-item toc-item-h2"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h2","href":"/cli.flatpak#basic-usage"},"children":[{"type":"text","value":"Basic usage"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h2","properties":{"id":"package-installation-interface"},"children":[{"type":"text","value":"Package installation interface"}]}]},"properties":{"className":"toc-item toc-item-h2"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h2","href":"/cli.flatpak#package-installation-interface"},"children":[{"type":"text","value":"Package installation interface"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h2","properties":{"id":"package-uninstallation-interface"},"children":[{"type":"text","value":"Package uninstallation interface"}]}]},"properties":{"className":"toc-item toc-item-h2"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h2","href":"/cli.flatpak#package-uninstallation-interface"},"children":[{"type":"text","value":"Package uninstallation interface"}]}]}]}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Flatpak is a cross-Linux-distro deployment system commonly used for packaging desktop applications.\n"}]},{"type":"element","tagName":"h1","properties":{"id":"options"},"children":[{"type":"text","value":"Options"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Flatpak has a similar interface to Git being composed of subcommands with specific options.\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["inline-verbatim"]},"children":[{"type":"text","value":"-v, --verbose"}]},{"type":"text","value":" - just print more information\n"}]}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Most
|