DNF ແລະ ຄໍາສັ່ງ APT ທີ່ທຽບເທົ່າກັນໃນ Fedora
APT is the package manager/dependency solver for the Debian ecosystem, i.e. it manages .deb packages installed by the DPKG program. Fedora software is based on .rpm packages, and therefore uses DNF, the package manager/dependency solver for the RPM program, instead. This document gives a brief overview of the most common APT commands one might find in tutorials and their DNF equivalents.
APT compared to DNF commands
| APT command | DNF command | notes |
|---|---|---|
|
|
Of course, actual package names may vary. For example, |
|
|
Updates only already installed package and its dependencies. The |
|
|
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 do not 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 |
|
|
|
ນອກເໜືອຈາກການອັບເກຣດລຸ້ນ (distribution upgrade) ທີ່ເຮັດວຽກແຕກຕ່າງກັນ ແລະ DNF ທີ່ອັບເດດແຄສໂດຍອັດຕະໂນມັດແລ້ວ, ຄໍາສັ່ງຕ່າງໆແມ່ນມີຄວາມຄ້າຍຄືກັນຫຼາຍ. ສາມາດເບິ່ງຂໍ້ມູນເພີ່ມເຕີມກ່ຽວກັບ DNF ໄດ້ ທີ່ນີ້.
Why is APT in the Fedora repositories
| APT ບໍ່ສາມາດ ໃຊ້ເພື່ອຕິດຕັ້ງແພັກເກັດໃນ Fedora ໄດ້, ທ່ານ ຕ້ອງໃຊ້ DNF ແທນ. |
The apt command on Fedora used to — until Fedora 32 — actually be APT-RPM, which mapped normal apt commands so that they worked with Fedora’s RPM package management system.
ແນວໃດກໍຕາມ, APT-RPM ແມ່ນບໍ່ໄດ້ຮັບການບຳລຸງຮັກສາ, ເພ ແລະ ບໍ່ມີຄວາມປອດໄພ, ດັ່ງນັ້ນຈຶ່ງຖືກຍົກເລີກ ແລະ ປ່ຽນມາໃຊ້ຊອບແວ Debian APT ຕົວຈິງແທນ. ເນື່ອງຈາກວ່າ APT ຈັດການສະເພາະແພັກເກັດ .deb, ຄໍາສັ່ງ apt ຈຶ່ງບໍ່ສາມາດໃຊ້ເພື່ອຈັດການແພັກເກັດຂອງ Fedora ໄດ້ອີກຕໍ່ໄປ. ຈຸດປະສົງຂອງມັນໃນຕອນນີ້ແມ່ນເພື່ອເປັນເຄື່ອງມືສໍາລັບຜູ້ທີ່ສ້າງແພັກເກັດສໍາລັບລະບົບປະຕິບັດການທີ່ອີງໃສ່ Debian ເທິງລະບົບ Fedora ເທົ່ານັ້ນ.
Want to help? Learn how to contribute to Fedora Docs ›