You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Could I change sudo nano /etc/hosts?

Can i add some lines to sudo nano/etc/hosts? It says "Do not Change this entry." Could i do that?

Thanks in advance 😀

MacBook Pro, Mac OS X (10.7.1)

Posted on Aug 26, 2011 3:39 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 26, 2011 5:29 PM

Sure, if you know what you're doing. Don't delete any of the existing entries, just add whatever additional hosts you want to define.


Just to clear one thing up - the filename is /etc/hosts, the text editor you're using to edit it is called "nano", and you're adding "sudo" to give yourself superuser privileges. So the whole command is indeed "sudo nano /etc/hosts", but you're adding lines to the hosts file.


Matt

3 replies
Question marked as Top-ranking reply

Aug 26, 2011 5:29 PM in response to NunoPortugal

Sure, if you know what you're doing. Don't delete any of the existing entries, just add whatever additional hosts you want to define.


Just to clear one thing up - the filename is /etc/hosts, the text editor you're using to edit it is called "nano", and you're adding "sudo" to give yourself superuser privileges. So the whole command is indeed "sudo nano /etc/hosts", but you're adding lines to the hosts file.


Matt

Aug 26, 2011 6:05 PM in response to Matt Clifton

Thanks. 😀

What's this "sudo dscacheutil -flushcache"???

Why show this "when the system is booting. Do not change this entry."????

Can i add what i want between 127.0.0.1 localhost and 255.255.255.255 broadcasthost?

Why is saying i can't change the file, why can i unprotect? Explain me.

Thanks in advance 😝


Message was edited by: NunoPortugal

Could I change sudo nano /etc/hosts?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.