0

I was messing with the .bashrc, and I made a lolcat echo. Now I can't use the terminal, and I don't know how to reset the .bashrc file to default.

Tejas Lotlikar
  • 2,945
  • 5
  • 17
  • 26
  • Depending on your Windows version, the WSL file system may show up in File Explorer, and you could just fix it. Although be careful to not mess up the line endings – cocomac Sep 07 '22 at 20:25
  • You could start WSL as the root user, and copy the /etc/skel/.bashrc to your user's home directory from there - see this similar question Can't fix an error inside of WSL because it's causing WSL to crash – steeldriver Sep 07 '22 at 20:55
  • Welcome to Ask Ubuntu! I agree with @steeldriver, either wsl -u root or wsl -e bash --norc --noprofile. Either one should get you in. – NotTheDr01ds Sep 08 '22 at 03:09
  • While the "How to restore .bashrc file" won't help you by itself under WSL, combining the techniques from the two Duplicate answers should be sufficient. I'm assuming at this point that you've recovered, since it's been a few weeks, but if you still have any issues, please let us know. – NotTheDr01ds Sep 25 '22 at 02:21

0 Answers0