Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2024-11-25T02:12:36.507Z
Answers: 2024-11-25T02:12:36.507Z
Answers: Evan Carroll
Body: <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>
  
Comments: CC BY-SA 4.0
Comments: 2024-11-21T03:34:02.247Z
Comments: 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.
Comments: Ajay
Comments: CC BY-SA 4.0
Comments: 2024-11-25T02:59:33.860Z
Comments: @Ajay I answered it below. Thanks though.
Comments: Evan Carroll
Comments: CC BY-SA 4.0
Comments: 2024-11-25T03:00:25.940Z
Comments: @Ajay I don't normally read dev.to, but that blog is pretty solid.
Comments: Evan Carroll
Tags: <github-actions><shell-script>
Title: What shell does GitHub Actions use?
UserDisplayName: Evan Carroll
ThreadText: # 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,
  
  ```yaml
  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)
  
  
  ---
  
  