Bird
0
0

You want to automate installing multiple packages: git, curl, and wget using dnf in a script. Which command is best?

hard📝 Application Q8 of 15
Linux CLI - Package Management
You want to automate installing multiple packages: git, curl, and wget using dnf in a script. Which command is best?
Adnf install -y git; curl; wget
Bdnf install git && dnf install curl && dnf install wget
Cdnf install git curl wget -y
Ddnf install git curl wget
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct syntax for multiple package install

    dnf allows installing multiple packages in one command by listing them separated by spaces.
  2. Step 2: Consider automation needs

    Adding -y auto-confirms prompts, ideal for scripts.
  3. Final Answer:

    dnf install git curl wget -y -> Option C
  4. Quick Check:

    Use 'dnf install pkg1 pkg2 -y' for scripted installs [OK]
Quick Trick: List packages with spaces and add -y for scripts [OK]
Common Mistakes:
  • Using multiple separate commands
  • Incorrect syntax with semicolons
  • Omitting -y in scripts

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes