I have windows 10 and I want to execute the sh command in the Jenkinsfile from Jenkins pipeline using bash for Ubuntu for windows, but it doesn\'t work
So you want the job running under WSL. If you want all jobs running under WSL have you considered installing Jenkins under WSL? Then everything is already in GNU land and you don't have to bridge the envrionment/culture of windows to GNU from within your Jenkins configuration.