Comandos equivalentes do APT no Fedora com DNF
APT é o gerenciador de pacotes / solucionador de dependências para o ecossistema Debian, ou seja, ele gerencia pacotes .deb
instalados pelo programa DPKG. O software Fedora é baseado em pacotes .rpm
e, portanto, usa o DNF, o gerenciador de pacotes/solucionador de dependências para o programa RPM. Este documento oferece uma breve visão geral dos comandos do APT mais comuns que podem ser encontrados em tutoriais e seus equivalentes DNF.
Comandos APT vs. DNF
APT command | DNF command | notes |
---|---|---|
|
|
Of course, actual package names may vary. For example, |
|
|
This command is rarely needed, as dnf updates its package cache automatically when it is stale. A cache update can be forced by appending |
|
|
Note that while |
|
|
While |
|
|
|
|
--- |
Fedora packages don’t treat configuration files in the same way as Debian packages, so there is no direct equivalent. |
|
|
Note that this can occasionally remove packages that you might actually want. Use |
|
|
|
With the exceptions of the distribution upgrade working differently, and DNF updating the cache automatically, the commands are very similar. More info on DNF can be found here.
Por que o APT está nos repositórios do Fedora?
APT não pode ser usado para instalar pacotes no Fedora, você deve usar o DNF para isso. |
The apt
command on Fedora used to — until Fedora 32 — actually be APT-RPM, which basically mapped normal apt commands so that they worked with Fedora’s RPM package management system.
However, APT-RPM is unmaintained, broken, and insecure, and so was dropped in favour of shipping the actual Debian APT software. Since APT exclusively deals with .deb
packages, the apt
command can no longer be used to manage Fedora packages. Its purpose is now purely as a tool for people building packages for Debian-based distributions on a Fedora system.
Want to help? Learn how to contribute to Fedora Docs ›