Bird
0
0

You want to automate installing multiple apps using flatpak in a script. Which snippet correctly installs VLC and GIMP and then lists installed apps?

hard📝 Application Q15 of 15
Linux CLI - Package Management
You want to automate installing multiple apps using flatpak in a script. Which snippet correctly installs VLC and GIMP and then lists installed apps?
Aflatpak install -y org.videolan.VLC org.gimp.GIMP; snap list
Bflatpak install org.videolan.VLC org.gimp.GIMP && flatpak list
Cflatpak install -y flathub org.videolan.VLC org.gimp.GIMP && flatpak list
Dflatpak install -y org.videolan.VLC && flatpak install org.gimp.GIMP && flatpak list
Step-by-Step Solution
Solution:
  1. Step 1: Understand flatpak install syntax for multiple apps

    You can install multiple apps in one command by listing them after 'flatpak install'. The '-y' flag auto-confirms prompts.
  2. Step 2: Check command chaining and listing

    flatpak install -y flathub org.videolan.VLC org.gimp.GIMP && flatpak list installs both apps with '-y' and explicit remote, then lists. flatpak install org.videolan.VLC org.gimp.GIMP && flatpak list misses '-y', so prompts block automation. flatpak install -y org.videolan.VLC && flatpak install org.gimp.GIMP && flatpak list uses separate commands but misses '-y' on second install, causing a prompt. flatpak install -y org.videolan.VLC org.gimp.GIMP; snap list mixes flatpak install with snap list, which won't show flatpaks.
  3. Final Answer:

    flatpak install -y flathub org.videolan.VLC org.gimp.GIMP && flatpak list -> Option C
  4. Quick Check:

    Use '-y' for auto yes and chain commands = D [OK]
Quick Trick: Use '-y' to auto-confirm and chain commands with && [OK]
Common Mistakes:
  • Forgetting '-y' causes manual prompts
  • Mixing snap and flatpak commands
  • Installing apps one by one unnecessarily

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes