Skip to main content

How do I run a different Shell interpreter in a Pipeline Script?



  • Grzegorz Zięba

    Hi Denis,
    Thank you for responding but I'm taking here about overwriting global configuration for single 'sh' statement which is currently not passible.

  • Grzegorz Zięba

    sh "..." will allocate default shell and then execute script according to shabang

    But there is no way to change shell for 'sh' statement . And that's an issue.

  • Denys Digtiar

    Hi Grzegorz,

    The plugins that provide `sh` step should recognize the "Shell executable" setting in the Manage Jenkins > Configure System. Note that the setting will change the default shell for other project types as well.

  • Blaise Pabon

    I was hoping to find an example with zsh. I'll have to hope that it's the same as ksh.


Please sign in to leave a comment.

About CloudBees Support

Our Support Engineers are available to help with any questions or problems you may have with any of our products.