<h1>Default Shells for Windows, and non-Windows</h1>
<ul>
<li>On Windows it sources <code>pwsh</code>.</li>
<li>On other platforms it sources an <code>sh</code> derivative, but bash firstly if the runner provides it.</li>
</ul>
<p>Source: The Runner's <a href="https://github.com/actions/runner/blob/c46dac6736deae8ac151001a3fece8057eb7325b/src/Runner.Worker/Handlers/ScriptHandler.cs#L82" rel="nofollow noreferrer">ScriptHandler.cs</a></p>

CC BY-SA 4.0
2024-11-25T02:12:36.507Z
2024-11-25T02:12:36.507Z
Evan Carroll
<p>If I have something like this in a job on GitHub Actions as part of my workflow,</p>
<pre class="lang-yaml prettyprint-override"><code>run: |
  echo this &gt;&gt; that
  echo the other
</code></pre>
<p>what shell does GitHub Actions use?</p>

CC BY-SA 4.0
2024-11-21T03:34:02.247Z
GitHub Actions uses different shells depending on the OS that is mentioned in the runs-on field. You can refer to this [article](https://dev.to/pwd9000/github-actions-all-the-shells-581h) to learn more about shells. If this doesn't answer your question, please add more detail by [editing](https://devops.stackexchange.com/posts/19899/edit) your question.
Ajay
CC BY-SA 4.0
2024-11-25T02:59:33.860Z
@Ajay I answered it below. Thanks though.
Evan Carroll
CC BY-SA 4.0
2024-11-25T03:00:25.940Z
@Ajay I don't normally read dev.to, but that blog is pretty solid.
Evan Carroll
<github-actions><shell-script>
What shell does GitHub Actions use?
Evan Carroll
# What shell does GitHub Actions use?

(Asked by: username_0 on 2024-11-15)

If I have something like this in a job on GitHub Actions as part of my workflow,
run: |
  echo this >> that
  echo the other

what shell does GitHub Actions use?

**Tags:** github-actions, shell-script

> **Comments:**
> **username_1**: GitHub Actions uses different shells depending on the OS that is mentioned in the runs-on field. You can refer to this [article](https://dev.to/pwd9000/github-actions-all-the-shells-581h) to learn more about shells. If this doesn't answer your question, please add more detail by [editing](https://devops.stackexchange.com/posts/19899/edit) your question.  
> **username_0**: @username_1 I answered it below. Thanks though.  
> **username_0**: @username_1 I don't normally read dev.to, but that blog is pretty solid.  

---

## 1 answers

### Answer by username_0 on 2024-11-25. Score: 0 | Accepted answer

# Default Shells for Windows, and non-Windows

* On Windows it sources `pwsh`.
* On other platforms it sources an `sh` derivative, but bash firstly if the runner provides it.

Source: The Runner's [ScriptHandler.cs](https://github.com/actions/runner/blob/c46dac6736deae8ac151001a3fece8057eb7325b/src/Runner.Worker/Handlers/ScriptHandler.cs#L82)


---

