Linux: Bash: /bin/bash^M: bad interpreter: No such file or directory

 

/bin/bash^M: bad interpreter: No such file or directory

the ^M is the key to the solution here.... invalid line endings

Windows & Linux use different EOL encoding...

in Notepad++ open the file and then select one according to the runtime host OS

  • Edit > EOL Conversion > Linux(LF)
  • Edit > EOL Conversion > Windows (CR LF)
  • Edit > EOL Conversion > Macinstosh (CR)
Tags