Primeiros passos
Fedora Silverblue is designed to be easy and straightforward to use, and specialist knowledge should generally not be required. However, Fedora Silverblue is built differently from other operating systems, and there are therefore some things that it is useful to know.
Fedora Silverblue has different options for installing software, compared with a standard Fedora Workstation (or other package-based Linux distributions). These include:
-
Flatpak apps: This is the primary way that (GUI) apps get installed on Fedora Silverblue.
-
Toolbox: Used primarily for CLI apps; development, debugging tools, etc., but also has support for graphical apps.
-
Package layering: Most Fedora packages can be installed on the system with the help of package layering. By default the system operates in pure image mode, but package layering is useful for things like libvirt, drivers, etc.
Although Flatpak is best suited for GUI apps, Toolbox for CLI apps and package layering for system-level packages, it’s ultimately up to you to choose the method that best suits your needs. There’s nothing wrong in installing CLI apps with Flatpak, or GUI apps with Toolbox, or using package layering only. Nevertheless, our examples stick to the aforementioned recommendations throughout this documentation.
Para informações sobre Flatpak e camada de pacote, veja abaixo.
Consulte a página dedicada do toolbox para começar a usá-lo.
Flatpak
Flatpak is the primary way that apps can be installed on Fedora Silverblue (for more information, see flatpak.org). Flatpak works out of the box in Fedora Silverblue, and Fedora provides a small (but growing) collection of apps that can be installed.
A outra fonte principal de aplicativos Flatpak é o Flathub, que fornece um grande repositório de aplicativos Flatpak que podem ser instalados.
Configurando o Flathub
To setup Flathub on Fedora Silverblue, open the Flathub setup page for Fedora and click the “Flathub repository file” button to download the Flathub configuration.
![sfg flathub fedora](../_images/sfg_flathub_fedora.png)
A popup window will show a download option for the file. The “Open with” option should show “Software Install (default)”. Click on the “OK” button to start the download.
![sfg flathub download](../_images/sfg_flathub_download.png)
After the download is complete, a new window will open showing the Flathub repository. This window also shows the source location of the repository to be installed, under the details heading (1). To start the installation of the Flathub repository, click on the “Install” button (2).
![sfg flathub install](../_images/sfg_flathub_install.png)
Após a conclusão do processo de instalação do repositório, a janela será atualizada para mostrar um botão “Remover” no lugar do botão “Instalar”.
Alternatively, you can use the following command from the terminal:
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Instalando aplicativos Flatpak do Flathub
Once the Flathub repository has been setup, it can be used to install Flatpak apps. This can be done directly from the GNOME Software application, or apps can be browsed on the Flathub website.
If you choose to install apps from the Flathub website, clicking "Install" will download a file which will be opened by the GNOME Software application, which can then be used to install the app. For example, to install LibreOffice, you first search for and open the LibreOffice page, and then press the “Install” button (2).
After clicking the “Install” button, a download information window will be shown. Verify the correct Flatpak has been downloaded and then click on the “OK” button to begin installing the LibreOffice application.
![sfg libreoffice install](../_images/sfg_libreoffice_install.png)
Once the Flatpak is downloaded, the GNOME Software application will open a new window with an “Install” button (2). Click this button to begin installation.
Alternatively, each application on flathub.org can be installed through the terminal by running the installation command at the bottom of the page that should look something like this:
$ flatpak install flathub <package-name>
As an example, Firefox can be installed by running the following command which can be found on Firefox’s flathub page:
$ flatpak install flathub org.mozilla.firefox
Linha de comando do Flatpak
Additional details about the flatpak command line interface can be found in the official Flatpak documentation.
Camada de pacote
Package layering works by modifying your Fedora Silverblue installation. As the name implies, it works by extending the packages from which Fedora Silverblue is composed.
Bons exemplos de pacotes a serem dispostos em camadas seriam:
-
fish
: Um shell Unix alternativo -
sway
: Um compositor Wayland lado a lado -
libvirt
: O daemon libvirt
Most (but not all) RPM packages provided by Fedora can be installed on Fedora Silverblue using this method.
Currently, using package layering creates a new "deployment", or bootable filesystem root. It does not affect your current root. This preserves rollback and the transactional model, but means that the system must be rebooted after a package has been layered or updated. You can alternatively use rpm-ostree install --apply-live <pkg>
to also temporarily apply the change directly to your currently booted deployment. It’s generally expected that you use package layering sparingly, and use flatpak
and dnf install
inside a toolbox
etc.
Package layering is generally done from the command line. However, the Software application does rely on it for installing a small number of apps that are currently difficult to install as Flatpaks.
Instalando pacotes
Packages can be installed on Fedora Silverblue using:
$ rpm-ostree install <nome do pacote>
This will download the package and any required dependencies, and recompose your Fedora Silverblue image with them. rpm-ostree
uses standard Fedora package names, which can be searched with rpm-ostree search
since Fedora Silverblue 39, or using DNF inside a toolbox for previous versions.
Assim que um pacote for instalado dessa maneira, ele será mantido atualizado conforme novas versões forem lançadas e o sistema operacional de base será atualizado.
By default, rpm-ostree
will download both required and recommended dependencies of layered packages. If you want dependency resolver to stick to required dependencies only, then you have to append
Recommends=false
line to the /etc/rpm-ostreed.conf
file. There’s no ad-hoc CLI flag to do so because of how rpm-ostree works internally.
Substituindo pacotes
In some scenarios, you may want to test out a new version of podman
or kernel
or other packages that live on the host. The rpm-ostree override
command can be used to replace a package with a different version. You can download the package locally and run:
$ rpm-ostree override replace <caminho para o pacote>
Or you can override packages without downloading using links from koji or bodhi. For example:
$ rpm-ostree override replace https://kojipkgs.fedoraproject.org//packages/podman/3.1.2/1.fc34/x86_64/podman-3.1.2-1.fc34.x86_64.rpm https://kojipkgs.fedoraproject.org//packages/podman/3.1.2/1.fc34/x86_64/podman-plugins-3.1.2-1.fc34.x86_64.rpm
Você também pode usar override remove
para efetivamente "ocultar" os pacotes; eles ainda existirão na camada de base subjacente, mas não aparecerão na raiz inicializada.
Removing and replacing packages using package layering is not generally recommended. For more information, see the rpm-ostree documentation.
Want to help? Learn how to contribute to Fedora Docs ›