Created
February 6, 2022 17:17
-
-
Save AnimeshRy/54dfc9f0b20c84ea203513097ed81556 to your computer and use it in GitHub Desktop.
WSL2 Ubuntu NPM Install Slow Fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I tried every solutions here, but nothing works for me. | |
But I found solutions. | |
in wsl, type below. | |
sudo rm /etc/resolv.conf | |
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf' | |
sudo bash -c 'echo "[network]" > /etc/wsl.conf' | |
sudo bash -c 'echo "generateResolvConf = false" >> /etc/wsl.conf' | |
sudo chattr +i /etc/resolv.conf | |
After that, type below in cmd with administrator. | |
wsl --shutdown | |
Works like a charm! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment