Created
September 12, 2022 08:55
-
-
Save jimklimov/415520de733e9ec2d159aff944c4fcb2 to your computer and use it in GitHub Desktop.
Fix for WSL2 lacks internet DNS
This file contains 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
#!/bin/sh | |
# Add as /etc/rc3.d/S99dns | |
if grep -q -E '^nameserver 8.8.8.8' /etc/resolv.conf ; then exit 0 ; fi | |
if [ "$1" = start ]; then | |
mkdir -p /run/resolvconf/ && echo 'nameserver 8.8.8.8' >> /etc/resolv.conf | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment