npm not working in WSL2When trying to run npm in WSL2 I got an error along these lines /mnt/c/Program Files/nodejs/npm: /bin/sh^M: bad interpreter: As the message indicates the problem is that WSL2 tries to run the Windows version of npm. You are supposed to be able to run...1 min read·dev.waltersson.com1ASep 6, 2020
Moving a WSL2 distributionBy default, any Linux distribution installed in WSL2 is located on your c: drive as a .vhdx file (Virtual Hard Drive file for Hyper-V). The safest way to move this file, as far as I can tell, is to use the import/export feature of wsl2. Export the e...1 min read·dev.waltersson.comSep 6, 2020