What shell is used in Jenkins when calling the shell
command? I\'m running Jenkins on a Linux machine.
Jenkins by default looks for sh
in the PATH
environment variable, however the result (e.g. /bin/sh
) may point to different shells. For example, on Ubuntu 6.10 or later, /bin/sh
is a symlink to Dash.
So for the question "what shell is used in Jenkins ...", it depends. To avoid the uncertainty, you can: (take Bash as an example)
/bin/bash
. (system-wide configuration)#!/usr/bin/env bash
(specific to a job)