Janik von Rotz


1 min read

bin/bash^M: bad interpreter

If you’re using windows and linux/unix and your also a system administrator who likes to script. The chances are high that you’ll get this error when executing a script on a linux/unix machine that has been made on a windows machine: bin/bash^M: bad interpreter: No such file or directoy

The ^M character is a windows line break, which linux/unix can’t interpret. The solution is easy, use dos2unix [filename] and everything should work fine.

Categories: Unix
Tags: bash , error , linux , scripting , unix
Improve this page
Show statistic for this page