What is the default shell used by 'run:' steps on a GitHub-hosted Windows runner?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Windows runners speak PowerShell by default — not cmd, not bash. You can override this with 'shell: bash' if Git Bash is available.
Full explanation below image
Full Explanation
GitHub-hosted Windows runners use PowerShell Core (pwsh) as the default shell for 'run:' steps. Ubuntu and macOS runners use bash as the default. You can override the shell per-step using 'shell: bash', 'shell: python', 'shell: cmd', etc. This distinction matters because PowerShell uses different syntax than bash for things like variable expansion ($env:VAR vs $VAR) and command chaining. The 'shell: cmd' option uses the legacy Windows Command Prompt.