0Pricing
Linux Command Line Mastery · Lekcja

Zarządzanie pakietami (CentOS/Fedora): `yum`, `dnf`, `rpm`

Dowiedzą się Państwo, jak zarządzać pakietami oprogramowania w systemach opartych na Red Hat za pomocą `yum`, `dnf` i `rpm`.

Zarządzanie pakietami (CentOS/Fedora): `yum`, `dnf`, `rpm` to bezpłatna lekcja Linux Command Line Mastery na CoddyKit. To lekcja 3 z 4. Możesz przeczytać całą lekcję poniżej za darmo — a potem ćwiczyć ją interaktywnie w przeglądarce z wbudowanym edytorem kodu i tutorem AI dostępnym 24/7. To część ścieżki edukacyjnej Linux Command Line Mastery, a Twój postęp synchronizuje się między webem a aplikacją CoddyKit. Kurs Linux Command Line Mastery zawiera 4 lekcji w sumie.

Części tej lekcji nie zostały jeszcze przetłumaczone i są wyświetlane po angielsku.

Intro to Package Management

Welcome to package management on CentOS/Fedora! Software on Linux systems is often distributed in 'packages'.

A package manager helps you install, update, configure, and remove software packages, as well as manage their dependencies (other software they rely on).

On Red Hat-based systems like CentOS and Fedora, we primarily use three tools: rpm, yum, and dnf.

RPM: The Foundation

At its core, all Red Hat-based systems use the Red Hat Package Manager (RPM). Think of rpm as the low-level tool.

It directly handles .rpm files, which contain compiled software and metadata. However, rpm doesn't automatically resolve dependencies.

  • Install: rpm -i package.rpm
  • Query: rpm -q package_name
  • Remove: rpm -e package_name

Querying Packages with RPM

Let's see how to query information about an installed package using rpm. The -q flag is for querying.

rpm -q bash checks if the 'bash' shell is installed. rpm -qi bash gives more detailed information.

rpm -q bash
rpm -qi bash

YUM: Solving Dependencies

Manually managing dependencies with rpm can be tedious. This is where YUM (Yellowdog Updater, Modified) came in.

yum is a higher-level tool built on top of rpm. It automatically searches repositories, resolves dependencies, and installs all necessary packages.

For many years, yum was the standard package manager for CentOS and older Fedora versions.

Installing Software with YUM

Using yum is much simpler for everyday tasks. To install a package, you just need its name.

Let's try installing a simple text editor like nano. You'll often need sudo for installation commands.

sudo yum install nano

Updating & Removing with YUM

yum makes it easy to keep your system updated and manage installed software.

  • Update all: sudo yum update
  • Update specific: sudo yum update package_name
  • Remove: sudo yum remove package_name
  • Search: yum search keyword

These commands handle all dependencies for you!

DNF: The Modern Standard

DNF (Dandified YUM) is the next-generation package manager, now standard in modern Fedora and CentOS Stream/8+.

It's an improved version of yum, offering better performance, more robust dependency resolution, and a cleaner codebase.

The good news? Most yum commands work almost identically with dnf!

DNF Basic Operations

Let's see dnf in action. Its syntax is very similar to yum.

We can use dnf to list available or installed packages, or to install new ones. Try listing all installed packages that include 'nano' in their name.

sudo dnf install nano
dnf list installed | grep nano

Managing Software Groups with DNF

One powerful feature of dnf (and yum) is the ability to manage software groups. These are collections of related packages for common tasks.

For example, you can install a 'Development Tools' group which includes compilers, debuggers, and other utilities.

dnf group list

Package Manager Quiz

Test your knowledge on CentOS/Fedora package managers!

Recap: CentOS/Fedora PM

You've explored the essential package managers for CentOS/Fedora:

  • rpm: The low-level foundation, handles individual .rpm files.
  • yum: The classic high-level manager, resolves dependencies automatically.
  • dnf: The modern, faster, and more robust successor to yum.

Mastering these tools is key to managing software effectively on Red Hat-based Linux systems. Keep practicing!

Często zadawane pytania

Czy lekcja „Zarządzanie pakietami (CentOS/Fedora): `yum`, `dnf`, `rpm`” jest bezpłatna?

Tak — pełny tekst „Zarządzanie pakietami (CentOS/Fedora): `yum`, `dnf`, `rpm`” jest dostępny za darmo tutaj w sieci. Aby ćwiczyć ją interaktywnie (wbudowany edytor kodu i tutor AI dostępny 24/7) i odblokować resztę kursu Linux Command Line Mastery, przejdź na CoddyKit PRO. Kurs Linux Command Line Mastery zawiera 4 lekcji w sumie.

Co nauczysz się w „Zarządzanie pakietami (CentOS/Fedora): `yum`, `dnf`, `rpm`”?

Dowiedzą się Państwo, jak zarządzać pakietami oprogramowania w systemach opartych na Red Hat za pomocą `yum`, `dnf` i `rpm`. Ćwiczysz Linux Command Line Mastery z praktycznym kodem, który uruchamiasz bezpośrednio w przeglądarce, a tutor AI dostępny 24/7 odpowiada na Twoje pytania podczas pracy nad lekcją.

Czy potrzebuję doświadczenia, aby zacząć Linux Command Line Mastery?

Nie wymagamy żadnego doświadczenia. Linux Command Line Mastery w CoddyKit jest strukturyzowany dla początkujących i zaawansowanych użytkowników, więc możesz zacząć tutaj lub od początku i uczyć się w swoim tempie. To lekcja 3 z 4.

Ile czasu zajmuje lekcja „Zarządzanie pakietami (CentOS/Fedora): `yum`, `dnf`, `rpm`”?

Większość lekcji CoddyKit trwa około 5–10 minut. Każda lekcja to mały, interaktywny krok, dzięki czemu robisz systematyczne postępy i zawsze wracasz dokładnie do tego samego miejsca — na webie i w aplikacji.

Czy mogę pisać i uruchamiać kod w tej lekcji Linux Command Line Mastery?

Tak. Każda lekcja Linux Command Line Mastery zawiera wbudowany edytor kodu, więc piszesz i uruchamiasz prawdziwy kod bezpośrednio w przeglądarce i od razu otrzymujesz sprzężenie zwrotne od AI — bez konfiguracji na komputerze.

Wszystkie lekcje w tym kursie

  1. Archiwizacja i kompresja: `tar`, `gzip`, `bzip2`
  2. Zarządzanie pakietami (Debian/Ubuntu): `apt`, `dpkg`
  3. Zarządzanie pakietami (CentOS/Fedora): `yum`, `dnf`, `rpm`
  4. Kompilowanie ze źródeł: configure, make i make install
← Powrót do Linux Command Line Mastery