I mistakenly edited the .bashrc
file for my WSL (Windows Subsystem for Linux) Bash using a Windows text editor (Notepad++).
Now whenever I run Bash I get the following error:
bash: /root/.bashrc: Input/output error
How can I fix this? I tried saving with Linux file endings (LF only) but that didn't work.
Best Answer
How can I fix this? I tried saving with Linux file endings (LF only) but that didn't work.
There are a couple of solutions:
One person said editing with
nano
and re-saving the file fixed the issue.If that doesn't work you can try the nuclear option of re-installing:
Source bash command not work for me after edit .bashrc using ST3
Further Reading