Created
August 9, 2016 18:52
-
-
Save nickboldt/7390a20ad5027a598d65ff44dcd5def5 to your computer and use it in GitHub Desktop.
add 8.8.8.8 to resolv.conf
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/bash | |
# note: run as root | |
# add 8.8.8.8 to /etc/resolv.conf | |
sed -e "s/nameserver 8.8.8.8//" /etc/resolv.conf | uniq > /etc/resolv.conf.2 | |
echo "nameserver 8.8.8.8" >> /etc/resolv.conf.2 | |
mv -f /etc/resolv.conf.2 /etc/resolv.conf | |
echo"" | |
echo "Current /etc/resolv.conf contains:" | |
cat /etc/resolv.conf | grep -v "#" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment