Bird
0
0

What will be the result of running dnf install -y vim on a system where vim is already installed?

medium📝 Command Output Q5 of 15
Linux CLI - Package Management
What will be the result of running dnf install -y vim on a system where vim is already installed?
Adnf will reinstall vim without asking
Bdnf will skip installation and report vim is installed
Cdnf will remove vim
Ddnf will throw an error
Step-by-Step Solution
Solution:
  1. Step 1: Understand dnf install -y behavior

    The -y flag auto-confirms prompts. If vim is installed, dnf checks and skips reinstalling.
  2. Step 2: Check expected output

    dnf reports that vim is already installed and does not reinstall or remove it.
  3. Final Answer:

    dnf will skip installation and report vim is installed -> Option B
  4. Quick Check:

    dnf install -y skips installed packages [OK]
Quick Trick: dnf install -y auto-confirms but skips installed packages [OK]
Common Mistakes:
  • Assuming reinstall always happens
  • Thinking -y removes packages
  • Expecting error on installed package

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes