I was editing the bashrc script in my Windows 10 Ubuntu Bash and I made a mistake while editing the script. Now bash exits immediately upon opening it. Is there a way for me to open Bash without running bashrc, or will I have to reinstall it?
You should be able to skip loading the default
.bashrc file in WSL in essentially the same way as in "regular" bash:
--norc Do not read and execute the system wide initialization file /etc/bash.bashrc and the personal initialization file ~/.bashrc if the shell is interactive. This option is on by default if the shell is invoked as sh.
So, open the Windows
CMD.exe and type
wsl.exe -e bash --norc
Once you are in the interactive shell you can revert the changes yo made to the