Uncategorized

How to edit host file mac os x 10.7.2

Setting the Mac hostname or computer name from the terminal. Type the following command to change the primary hostname of your Mac: This is your fully qualified hostname, for example myMac. Type the following command to change the Bonjour hostname of your Mac: This is the name usable on the local network, for example myMac.

network - Set the hostname/computer name for macOS - Ask Different

If you also want to change the computer name , type the following command: This is the user-friendly computer name you see in Finder, for example myMac. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service , privacy policy and cookie policy , and that your continued use of the website is subject to these policies.

Home Questions Tags Users Unanswered. When trying to open my router and check "Connected devices", under the IP address of this Mac I see following: Site stripped my script… For all lazy developers out there: And as some other users have experienced weird behaviors ensued.

Your Answer

They just plainly ignored the DNS server on Long answer here: I was experiencing the same issues as discussed. I managed to work with AppleCare by some stroke of luck, and the Apple engineers determined that my hosts file was corrupted—although the file did not appear corrupted as I was able to cat, less, and otherwise edit the file. Upon deleting and putting a new hosts file in place, everything started working as expected once again. I suspect the upgrade from Snow Leopard to Lion caused the file corruption, but I have no concrete evidence of same.

I can confirm Roberts response, I was experiencing the same issue as the author, am using an SL to Lion upgraded iMac, and showed the same order of services in scutil. Hm, I find Lion Host Database localhost is used to configure the loopback interface when the system is booting. Do not change this entry. The problem for me was actually the encoding of the host files that Gas Mask was saving.

I was having the issue where no matter what I put in the file via the Gas Mask editor, nothing changed. It turned out that the hosts file that was being saved was Unicode UTF 8. Perhaps Gas Mask could be changed to write files in Western instead of Unicode. I run DNS servers that provide lookups for. Made leap from linux to mac dev environment and never would have thought using. Could not resolve hostname cm Your final update about the line endings on the hosts file helped me.

I wonder what could have changed it. Thanks for the help.

How to Edit Hosts File on Mac

The fix was adding this to my httpd-vhosts. You are commenting using your WordPress. You are commenting using your Twitter account. You are commenting using your Facebook account. Notify me of new comments via email. This site uses Akismet to reduce spam. Learn how your comment data is processed. Skip to content Final Update: Problem 1: Before you could do something like this, which is works in several other operating systems: So your configuration should look like this: Problem 2: Scoped I spent hours and hours googling, finding a bunch of people with this same problem, but no solution on how to fix the ordering.

First, run selfupdate to make sure your MacPorts repositories are up to date: Now, it is installed, but we need to have OS X run it: I can only see one of the following reasons: Security — Maybe, just maybe, it was for security. So you could maybe have a user visit http: So this might be a reason, but out of all the things that can go wrong with a virus, it is a poor excuse. I know people who have circumvented other software activation systems do the same technique.

Apple Footer

An Honest Bug — It is possible this was a bug, but seeing as how you would have to deliberately change the resolve orders for the operating system, I doubt this is the case. Share this: Twitter Facebook Google. Like this: Like Loading Newer Comments.

Mac OS X Lion, /etc/hosts Bugs, and DNS Resolution

Joseph Scott July 27, — 4: Post author Justin Carmony July 27, — 4: I forgot, yes, I did do that, though I forgot to add that in the post. Andrea July 27, — 5: Jonathan July 27, — 5: Why do you need multiple names per line? I usually make a separate line for each name. H July 27, — 5: Clint July 27, — 6: Post author Justin Carmony July 27, — 6: Richard K Miller July 28, — Ted Wood August 2, — Ted Wood August 2, — 2: Nevertheless, I have DNSmasq installed and all seems to be working well.

George Zhu August 2, — 8: Great post! Phil Jones August 3, — Just a massive thank you for this. Changing to. FabD August 4, — 8: Fabien Like Like. I use the hosts file distributed by: So that is where this horrible idea came from!

That's just obscene. Get yourself a decent ad-blocker or something. Don't ever do anything like that. Sep 18, 4: Jan 15, 7: Same problem here. Took me 2 hours to figure out. So I opened on vi and worked! Feb 6, 1: Feb 6, 5: Feb 6, 7: I am aware that many problems are made worse by infrequent booting so I have a tendency to advise booting at the end of my posts. However, in this case there is a good reason to boot: Part of the purpose of the hosts file is to supply information at boot.

If there is a glitch it is better to discover it now so that you can remember the likely cause.


  • From our Sponsor....
  • install roller coaster tycoon 2 mac.
  • orange charger light on mac.
  • nat error no route to host mac.

Feb 6, 9: I am going to have to back up Neville on this one. Modern OS X heavily caches system settings. The internet is full of suggestions to hack up various config files and preferences files to try to fix things.


  • How to Edit the Hosts File in Mac OS X with Terminal.
  • encrypt excel file mac 2011.
  • mac os draaien op pc.
  • What you’ll need.
  • download youtube videos onto desktop mac?
  • Problem #1: Bugs with Multiple Domains per Line.

That isn't going to work like it used to.