Bird
0
0

Why does PowerShell on macOS use the 'pwsh' command instead of 'powershell' like on Windows?

hard📝 Conceptual Q10 of 15
PowerShell - Cross-Platform PowerShell
Why does PowerShell on macOS use the 'pwsh' command instead of 'powershell' like on Windows?
A'pwsh' is an alias created by the user
B'powershell' is reserved for Windows only
CmacOS does not support the 'powershell' command
D'pwsh' is the cross-platform PowerShell Core executable name
Step-by-Step Solution
Solution:
  1. Step 1: Understand PowerShell Core naming

    PowerShell Core is cross-platform and uses 'pwsh' as its executable name on macOS and Linux.
  2. Step 2: Clarify Windows vs macOS naming

    Windows PowerShell uses 'powershell', but cross-platform version uses 'pwsh' to avoid conflicts.
  3. Final Answer:

    'pwsh' is the cross-platform PowerShell Core executable name -> Option D
  4. Quick Check:

    Cross-platform PowerShell = pwsh executable [OK]
Quick Trick: Remember 'pwsh' is PowerShell Core's cross-platform name [OK]
Common Mistakes:
  • Thinking 'powershell' is supported on macOS
  • Assuming 'pwsh' is user alias
  • Believing macOS blocks 'powershell' command

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes