dnf install

पैकेज और रनटाइम

इस्तेमाल

sudo dnf install [-y] <package>

सक्रिय repository से dependency सुलझाकर स्थापित करता है और metadata अपने आप ताज़ा करता है, इसलिए apt जैसा अलग update नहीं चाहिए; RHEL 8 से yum दरअसल dnf का link है, और Fedora 41 से dnf5 आ गया।

आम विकल्प

विकल्पअर्थ
-yassume yes
--refreshexpire the metadata cache before resolving
--enablerepo=<repo>use a repository that is off by default
--setopt=install_weak_deps=Falseskip weak dependencies
--allowerasinglet it remove packages to satisfy the request
--nogpgcheckinstall without checking signatures

उदाहरण

sudo dnf install -y git

installs with dependencies from the enabled repos

sudo dnf install --refresh nginx

refreshes metadata first, then installs

sudo dnf install ./package.rpm

installs a local rpm and resolves its dependencies

सवाल हमेशा यही है कि क्या कहाँ जाए: इस प्रोजेक्ट के भीतर, या पूरी मशीन पर।

कैसे पढ़ें

  • बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
  • तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
  • विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।

आम सवाल

Q. dnf install क्या करता है?

सक्रिय repository से dependency सुलझाकर स्थापित करता है और metadata अपने आप ताज़ा करता है, इसलिए apt जैसा अलग update नहीं चाहिए; RHEL 8 से yum दरअसल dnf का link है, और Fedora 41 से dnf5 आ गया।

Q. इसे कैसे लिखें?

sudo dnf install [-y] <package> — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।

Q. कितने विकल्प जानने लायक़ हैं?

यहाँ 6 दिए हैं; पूरी सूची man dnf में है। यह कमांड पैकेज और रनटाइम में आती है।

मिलती-जुलती कमांड

man पेज: man dnf-install