<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Dnf on foosel.net</title><link>https://foosel.net/tags/dnf/</link><description>Recent content in Dnf on foosel.net</description><generator>Hugo</generator><language>en-us</language><copyright>Gina Häußge (foosel)</copyright><lastBuildDate>Thu, 02 Mar 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://foosel.net/tags/dnf/feed.xml" rel="self" type="application/rss+xml"/><item><title>How to make dnf default to yes</title><link>https://foosel.net/til/how-to-make-dnf-default-to-yes/</link><pubDate>Thu, 02 Mar 2023 00:00:00 +0000</pubDate><guid>https://foosel.net/til/how-to-make-dnf-default-to-yes/</guid><description>&lt;p&gt;I&amp;rsquo;m currently in the process of setting up my new &lt;a href="https://frame.work"&gt;Frame.work laptop&lt;/a&gt;, and since I&amp;rsquo;ve been using Debian-derivatives for the past two decades now, I decided to use the opportunity, try something new for once and installed &lt;a href="https://fedoraproject.org"&gt;Fedora&lt;/a&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;
&lt;p&gt;Something that got annoying quickly is that the package manager command &lt;code&gt;dnf&lt;/code&gt; defaults to &amp;ldquo;no&amp;rdquo; when asking if you really want to install a package plus its dependencies. I&amp;rsquo;m very used to &lt;code&gt;apt&lt;/code&gt;&amp;rsquo;s behaviour here that allows me to type &lt;code&gt;sudo apt install &amp;lt;package&amp;gt;&lt;/code&gt; and then just hit &lt;code&gt;Enter&lt;/code&gt; on the sanity check. I wanted the same for &lt;code&gt;dnf&lt;/code&gt;, but without bypassing the sanity check altogether. I did some digging together with my buddy &lt;a href="https://ben.sycha.uk/"&gt;Ben&lt;/a&gt; and we found the answer.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I&rsquo;m currently in the process of setting up my new <a href="https://frame.work">Frame.work laptop</a>, and since I&rsquo;ve been using Debian-derivatives for the past two decades now, I decided to use the opportunity, try something new for once and installed <a href="https://fedoraproject.org">Fedora</a><sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>.</p>
<p>Something that got annoying quickly is that the package manager command <code>dnf</code> defaults to &ldquo;no&rdquo; when asking if you really want to install a package plus its dependencies. I&rsquo;m very used to <code>apt</code>&rsquo;s behaviour here that allows me to type <code>sudo apt install &lt;package&gt;</code> and then just hit <code>Enter</code> on the sanity check. I wanted the same for <code>dnf</code>, but without bypassing the sanity check altogether. I did some digging together with my buddy <a href="https://ben.sycha.uk/">Ben</a> and we found the answer.</p>
<p>Edit the file <code>/etc/dnf/dnf.conf</code> and add the following line to the <code>[main]</code> section:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>defaultyes<span style="color:#f92672">=</span>True
</span></span></code></pre></div><p>And once that&rsquo;s done, the sanity check now is <code>Y/n</code> instead of <code>y/N</code> and you can just hit <code>Enter</code> to install the package.</p>
<p>(This is btw the first post written on the new laptop and I&rsquo;m really enjoying it so far!)</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>To all my Debian friends: It&rsquo;s really just curiousity and expanding my horizon, no need to try to convert me back or anything like that 😉&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item></channel></rss>