0Pricing
Linux Command Line Mastery · درس

إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm`

افهم كيفية إدارة حزم البرامج على الأنظمة المستندة إلى Red Hat باستخدام `yum` و`dnf` و`rpm`.

إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm` درس مجاني في Linux Command Line Mastery على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Linux Command Line Mastery، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Linux Command Line Mastery 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

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!

الأسئلة الشائعة

هل درس «إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm`» مجاني؟

نعم — نص درس «إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm`» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Linux Command Line Mastery، انتقل إلى CoddyKit PRO. تتضمن دورة Linux Command Line Mastery 4 دروس في المجموع.

ماذا ستتعلم في «إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm`»؟

افهم كيفية إدارة حزم البرامج على الأنظمة المستندة إلى Red Hat باستخدام `yum` و`dnf` و`rpm`. تتمرن على Linux Command Line Mastery مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Linux Command Line Mastery؟

لا تُشترط خبرة سابقة. Linux Command Line Mastery على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.

كم من الوقت يستغرق درس «إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm`»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Linux Command Line Mastery هذا؟

نعم. كل درس في Linux Command Line Mastery يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. الأرشفة والضغط: `tar` و`gzip` و`bzip2`
  2. إدارة الحزم (Debian/Ubuntu): `apt` و`dpkg`
  3. إدارة الحزم (CentOS/Fedora): `yum` و`dnf` و`rpm`
  4. البناء من المصدر: configure وmake وmake install
← العودة إلى Linux Command Line Mastery