How to you edit the /etc/hosts file? My father put every video site on the internet on and he won't tell me how to get rid of it. I need an answer because tinypic and youtube are on it!
Asked
Active
Viewed 1.2e+01k times
21
Florian Diesch
- 89,643
Tux1
- 231
2 Answers
22
You need open the file as root:
Open the terminal CTRL + ALT + T.
sudo nano /etc/hosts (You need enter your user password)
after, it will open the file to edit, use CTRL + X to close and save the file.
Good luck!
Marcos Silveira
- 1,155
3
Open the terminal by pressing CTRL + ALT + T.
Get the info you need your going to want to copy the commands output.
neil@ASUS:~$ sudo cat /etc/hosts | grep 127.0.0.1
Copy the outputted code.
127.0.0.1 localhost
127.0.0.1 ASUS
Then type in terminal
sudo rm /etc/hosts
then type in
sudo nano /etc/hosts
Press CTRL + shift + V
Then your hosts file shoud look like this.
127.0.0.1 localhost
127.0.0.1 ASUS
and then press Ctrl + X to save
That should restore what your father did. unless he deleted 127.0.0.1 from the host file.
Neil
- 4,585