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.
时间: 2024-10-23 18:12:11