How to solve "/bin/sh^M:bad interpreter: No such file or directory"

1. The issue is because windows and linux has different file system.
2. Use vim to open the file
3. Type :set ff?, you will see the text "fileformat=dos" or "fileformat=unix"
4. if you find the fileformat is dos, then you got the reason of "/bin/sh^M:bad interpreter: No such file or directory"
5. How to solve? It's very easy, just need to type :set ff=unix
6. Execute the shell again, everything will be ok.

 

posted on 2015-06-01 18:47  karenwang  阅读(131)  评论(0编辑  收藏  举报

导航