Problem:
When there’s an incorrect setup of Windows Subsystem for Linux (WSL), where $HOME/.bashrc is corrupted or having an ‘exit’ statement during its runtime, Windows cannot log into is WSL using the normal wsl command.
How To Fix:
# Execute bash using a different home directory
C:\Windows\System32\bash.exe ~ -c /bin/bash
# Edit the broken bashrc file
vim ~/.bashrc
Categories:
Mario
Amazing, a help article on the internet that just tells you exactly the fix without rambling on for four paragraphs! Why isn’t this the standard?
kimconnect
Thanks, Mario for the nice comment 🙂
Alex
Thanks man, I fucked my WSL badly, and am now able to backup my home dir 🙂
kimconnect
You’re welcome. I’m glad that this silly note has helped someone 🙂