Skip to content

Commit

Permalink
fixed error in localhost IP
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelWorld20 committed Nov 3, 2023
1 parent 49f3587 commit 20feb76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 0x08-networking_basics_2/0-change_your_home_IP
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
# localhost resolves to 127.0.0.2
# facebook.com resolves to 8.8.8.8

sudo cp /etc/hosts /etc/hosts.bak
sudo cp /etc/hosts ~/hosts.new

echo "127.0.0.2 localhost" | sudo tee -a /etc/hosts
nice -n 10 sed -i s/127.0.0.1/127.0.0.2/ ~/hosts.new
sudo cp -f ~/hosts.new /etc/hosts
echo "8.8.8.8 facebook.com" | sudo tee -a /etc/hosts

0 comments on commit 20feb76

Please sign in to comment.