The hosts file is one of the important network files of any operating system. We all know about DNS, which maps I.P. address to a domain address. For example, when you type dollarmind.com.ng in your browser URL, your internet connection queries DNS system of your I.S.P. to find the I.P. address and thus serve website in your browser.

This also brought the concept of Public DNS, which I have already discussed in detailed earlier (Using Google DNS to speed up The internet). Similarly, Hosts file is for your local computer.

You can add custom detail in your Hosts file, and before checking DNS, your system will check operating system hosts file for any reference. For example, if you add Google.com I.P. address for Facebook.com domain in your OS Hosts files, when ever someone will type Facebook.com in the browser URL, Google.com will be open in the browser. (A great idea for prank too). Anyways, I will not get into detailed explanation of DNS and Hosts files, but if you are interested to learn these basics (you should)

Editing Hosts file in Mac using Nano:

At the time of writing this article, I’m using Mac 10.8.4, and whenever I try to edit the hosts file using Text editor, I see the Locked error. I couldn’t find any option to unlock the Hosts files, and edit it using Mac Text Editor. Here is the error that I got, while trying to edit hosts file:

You don’t own the file “hosts” and don’t have permission to write to it.

How To Edit Hosts File in Mac OS

This is the default location of hosts files in Mac OS X:

/private/etc/hosts

And, here is the way to edit the file. Open terminal and type this command:

sudo nano /private/etc/hosts

And it will ask your system password once you enter the password, you will see a screen like this:

How To Edit Hosts File in Mac OS

Nano is the terminal editor, and if you wish to learn all the commands of this editor, here is a handy reference. Now, use your cursor to move, and edit the hosts files according to your requirement. Once you are done making changes, click on

  • Ctrl+ 0 : Click Enter after that. (This will save your output)
  • Ctrl + X: This will exit the Nano editor.

Update: You can download this Mac app call Gasmasks to edit hosts file quickly.

It took me 15 minutes to find the solution to locked hosts files issue in Mac, and I hope this article will save your precious time. If you are still stuck or have any question, feel free to ask me via comments. Do check out our other articles on general-tech, and you will learn something new today.

Sharing is Caring, also use the comment section for any Contributions and further questions

Bukason

Comments (139)

  1. Reply

    Wonderful site you have here but I was curious about if you knew of any message boards that cover the same topics talked about here? I’d really love to be a part of online community where I can get feedback from other experienced individuals that share the same interest. If you have any suggestions, please let me know. Thanks!|

  2. Bryant Minick

    Reply

    Way cool! Some very valid points! I appreciate you penning this article and the rest of the website is really good.|

  3. Jina Perricone

    Reply

    Hi there! Do you use Twitter? I’d like to follow you if that would be ok. I’m absolutely enjoying your blog and look forward to new updates.|

  4. Tyra Kratzke

    Reply

    Simply wish to say your article is as amazing. The clarity to your publish is just cool and that i could think you are knowledgeable on this subject. Well with your permission let me to snatch your RSS feed to keep up to date with imminent post. Thanks one million and please keep up the enjoyable work.|

  5. Gil Bufkin

    Reply

    It’s remarkable to visit this web site and reading the views of all mates on the topic of this post, while I am also keen of getting know-how.|

  6. Reply

    Thank you for the good writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! However, how can we communicate?|

  7. Marquerite Dapper

    Reply

    Hmm is anyone else encountering problems with the pictures on this blog loading? I’m trying to figure out if its a problem on my end or if it’s the blog. Any feedback would be greatly appreciated.|

  8. Reply

    hi!,I really like your writing so a lot! share we keep up a correspondence extra about your post on AOL? I require an expert in this space to solve my problem. May be that is you! Having a look forward to peer you. |

  9. Alonzo Caddigan

    Reply

    Hi there, just became aware of your blog through Google, and found that it’s truly informative. I’m going to watch out for brussels. I will be grateful if you continue this in future. A lot of people will be benefited from your writing. Cheers!|

  10. Antwan Elworthy

    Reply

    I’m not sure where you are getting your information, but great topic. I needs to spend some time learning more or understanding more. Thanks for fantastic information I was looking for this information for my mission.|

  11. Reply

    Hi! I’ve been following your blog for some time now and finally got the bravery to go ahead and give you a shout out from Lubbock Texas! Just wanted to say keep up the great work!|

  12. Lester Rackers

    Reply

    If some one wants to be updated with latest technologies therefore he must be pay a visit this web page and be up to date all the time.|

  13. Stefan Jaspers

    Reply

    I do not know whether it’s just me or if everybody else encountering problems with your website. It looks like some of the text in your posts are running off the screen. Can somebody else please provide feedback and let me know if this is happening to them as well? This might be a issue with my browser because I’ve had this happen previously. Cheers|

  14. Evita Slate

    Reply

    Article writing is also a fun, if you be acquainted with afterward you can write or else it is complicated to write.|

  15. Liana Reece

    Reply

    Having read this I believed it was really enlightening. I appreciate you finding the time and effort to put this content together. I once again find myself spending way too much time both reading and posting comments. But so what, it was still worthwhile!|

  16. Lakendra Billey

    Reply

    Very good information. Lucky me I ran across your site by accident (stumbleupon). I’ve book marked it for later!|

  17. Morton Genzel

    Reply

    Howdy, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you prevent it, any plugin or anything you can recommend? I get so much lately it’s driving me crazy so any support is very much appreciated.|

  18. Allegra Laborde

    Reply

    each time i used to read smaller articles or reviews which as well clear their motive, and that is also happening with this post which I am reading at this place.|

  19. Reply

    I’m not sure where you are getting your info, but great topic. I needs to spend some time learning more or understanding more. Thanks for fantastic information I was looking for this information for my mission.|

  20. Reply

    I relish, result in I found exactly what I was having a look for. You’ve ended my 4 day lengthy hunt! God Bless you man. Have a great day. Bye|

  21. Reply

    For newest information you have to pay a quick visit world-wide-web and on internet I found this web page as a best web site for most up-to-date updates.|

  22. Rueben Lehnen

    Reply

    An interesting discussion is definitely worth comment. There’s no doubt that that you ought to publish more on this subject, it may not be a taboo matter but typically folks don’t speak about such topics. To the next! All the best!!|

  23. Reply

    With havin so much written content do you ever run into any problems of plagorism or copyright violation? My site has a lot of exclusive content I’ve either written myself or outsourced but it looks like a lot of it is popping it up all over the web without my permission. Do you know any solutions to help reduce content from being ripped off? I’d definitely appreciate it.|

  24. Reply

    Wow that was unusual. I just wrote an extremely long comment but after I clicked submit my comment didn’t show up. Grrrr… well I’m not writing all that over again. Anyways, just wanted to say excellent blog!|

  25. Reply

    Hmm it seems like your blog ate my first comment (it was extremely long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to the whole thing. Do you have any points for novice blog writers? I’d definitely appreciate it.|

  26. Reply

    I’m not that much of a internet reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your site to come back later on. Cheers|

  27. Reply

    Your style is really unique in comparison to other people I’ve read stuff from. Thanks for posting when you’ve got the opportunity, Guess I’ll just bookmark this web site.|

  28. Reply

    Hi there fantastic website! Does running a blog such as this take a massive amount work? I’ve very little knowledge of programming however I had been hoping to start my own blog soon. Anyhow, if you have any recommendations or tips for new blog owners please share. I know this is off subject nevertheless I simply had to ask. Thanks a lot!|

  29. Reply

    Pretty nice post. I just stumbled upon your weblog and wished to say that I have really enjoyed surfing around your blog posts. In any case I will be subscribing to your rss feed and I hope you write again soon!|

  30. Reply

    I have been exploring for a little for any high quality articles or weblog posts in this sort of space . Exploring in Yahoo I at last stumbled upon this web site. Studying this information So i’m happy to express that I’ve an incredibly excellent uncanny feeling I came upon exactly what I needed. I so much definitely will make sure to do not forget this web site and give it a glance regularly.|

  31. Reply

    Fantastic goods from you, man. I’ve understand your stuff
    previous to and you’re just too wonderful. I actually like
    what you have acquired here, certainly like what you are
    stating and the way in which you say it. You make it entertaining and you still take care of to keep
    it smart. I can’t wait to read much more from you. This is actually a terrific site.

  32. Reply

    Hey there! Quick question that’s completely off topic. Do you know
    how to make your site mobile friendly? My blog looks weird when viewing from my iphone.
    I’m trying to find a theme or plugin that might be able to correct this
    problem. If you have any suggestions, please share. Many thanks!

  33. Reply

    Great blog here! Also your web site loads up very fast!
    What web host are you using? Can I get your affiliate link to your host?
    I wish my web site loaded up as fast as yours lol

  34. Reply

    If you are going for most excellent contents like I do, just visit this website all the
    time since it gives feature contents, thanks

  35. Reply

    This web site truly has all of the information I needed
    concerning this subject and didn’t know who to ask.

  36. Reply

    Please let me know if you’re looking for a author for your weblog.
    You have some really great articles and I think I would be a
    good asset. If you ever want to take some of the load off, I’d
    really like to write some content for your
    blog in exchange for a link back to mine. Please shoot me an email if interested.

    Thank you!

  37. Reply

    I got this website from my friend who told me
    regarding this web page and at the moment this time I am visiting this web page and reading very informative
    articles here.

  38. Reply

    I’m no longer sure the place you are getting your info, however good topic.

    I must spend some time finding out more or figuring out more.

    Thank you for magnificent info I was in search of this info for
    my mission.

  39. Reply

    Thank you for some other informative website. Where else may I get that kind
    of information written in such a perfect approach?
    I’ve a venture that I’m simply now working on, and I’ve been at the look out for such information.

  40. Reply

    Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your weblog?

    My blog site is in the very same niche as yours and my users
    would really benefit from a lot of the information you present here.
    Please let me know if this ok with you. Thank you!

  41. Reply

    The next time I read a blog, I hope that it won’t fail me just as much as this particular one. After all, I know it was my choice to read, however I truly believed you would probably have something interesting to say. All I hear is a bunch of whining about something that you could fix if you were not too busy looking for attention.

  42. Reply

    I do consider all of the concepts you have introduced
    on your post. They are very convincing and will definitely work.
    Nonetheless, the posts are too quick for beginners. Could you please prolong them a bit from
    subsequent time? Thank you for the post.

  43. Reply

    If you want to grow your knowledge just keep visiting this site and be updated with the
    most up-to-date news posted here.

  44. Reply

    Hey! I know this is kinda off topic but I’d figured I’d
    ask. Would you be interested in exchanging links or maybe guest writing
    a blog post or vice-versa? My blog discusses a lot of the
    same subjects as yours and I believe we could greatly benefit from each other.
    If you’re interested feel free to shoot me an email.

    I look forward to hearing from you! Superb blog by the way!

  45. Reply

    Hello my friend! I wish to say that this post is amazing, great written and
    come with almost all significant infos. I would like to peer
    more posts like this .

  46. Reply

    Hi there, its pleasant post regarding media print, we
    all be familiar with media is a impressive source of facts.

  47. Reply

    Heya are using WordPress for your site platform? I’m new to the blog world but I’m trying to get started and set up
    my own. Do you need any html coding expertise to make
    your own blog? Any help would be greatly appreciated!

  48. Reply

    Hello, i feel that i saw you visited my website so
    i got here to return the desire?.I’m trying to find issues to enhance my
    website!I guess its adequate to make use of some of your ideas!!

  49. Reply

    No matter if some one searches for his necessary thing, so he/she desires to be available that in detail,
    thus that thing is maintained over here.

  50. Reply

    Have you ever considered about adding a little bit more than just your articles?
    I mean, what you say is important and all. But imagine if you added
    some great photos or videos to give your posts more, “pop”!
    Your content is excellent but with images and clips, this website could undeniably be one of
    the very best in its niche. Excellent blog!

  51. Reply

    Hey! I know this is kind of off-topic however I had to ask.

    Does running a well-established blog such as yours take a lot of work?
    I’m completely new to blogging but I do write in my journal every day.
    I’d like to start a blog so I will be able to share my personal experience and thoughts online.

    Please let me know if you have any kind of ideas or tips for new aspiring bloggers.

    Appreciate it!

  52. Reply

    Foto Galeriler
    Festival kapsamında gün galası yapılan filmlerden biri de The Human Voice oldu.
    Filmin gösterimine oyuncu kadrosu ve kamera arkası ekibinin yanı sıra ünlü konuklar da katıldı.Bunlar arasında en çok dikkat
    çeken kişi ise Cristiano Ronaldo’nun sevgilisi Georgina Rodriguez oldu.
    26 yaşındaki model Rodriguez, önce bu filmin gösterimine ardından da akşam düzenlenen bir etkinliğe katıldı.
    İşte birbirinden güzel foto galeriler..

  53. Reply

    But this takes cooperation, along with a sharing of
    ideas, rather then sending short-term aid and assistance. They brought their homage by hymns and prayers,
    gifts of food and drink. The beautiful terraced green padi
    fields are another must see for a visitor for the island of Bali.

    Here is my website – Ekonomi Indonesia

  54. Reply

    I know this if off topic but I’m looking into starting
    my own blog and was curious what all is needed to get set
    up? I’m assuming having a blog like yours would cost a pretty
    penny? I’m not very web savvy so I’m not 100% sure.

    Any tips or advice would be greatly appreciated.

    Many thanks

  55. Reply

    Hello there, just became aware of your blog through Google, and found that
    it is truly informative. I am gonna watch out for brussels.
    I’ll be grateful if you continue this in future.
    Numerous people will be benefited from your writing.
    Cheers!

  56. Reply

    Thanks , I have just been searching for info approximately this topic for a while and yours is the
    greatest I’ve found out till now. However, what concerning the conclusion? Are you positive about
    the supply?

  57. Reply

    I have been browsing online more than 2 hours today, yet I never found any interesting
    article like yours. It is pretty worth enough for me.
    In my opinion, if all web owners and bloggers made good content
    as you did, the web will be a lot more useful than ever before.

  58. Reply

    We’re a group of volunteers and opening a new scheme
    in our community. Your website provided us with valuable
    info to work on. You have done a formidable job and our whole community will be
    grateful to you.

  59. Reply

    istanbul escort
    Bir çok erkeğin favorisi olan İstanbul
    Escort sitesini ziyaret edebilirsiniz, diğer eskort siteleri arasında tek tercihinizi bu siteden yana kullandığınız için çok memnun kalacaksınız.

    En kaliteli ve birbirinden güzel olan istanbul escort kızların ilanlarını
    yalnızca burada bulabilirsiniz. Kadıköy Escort, Ataşehir Escort ve Beşiktaş Escort olarak da hizmet veren sitemizi şimdi ziyaret et sen kazan!

  60. Reply

    Excellent beat ! I wish to apprentice at the same time as you amend your site, how could i subscribe for a weblog
    web site? The account helped me a appropriate deal. I had been tiny bit familiar of this your broadcast provided brilliant transparent concept

  61. Reply

    It’s a pity you don’t have a donate button! I’d certainly donate to this
    superb blog! I guess for now i’ll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to new updates and will share this site with my Facebook group.
    Talk soon!

  62. Reply

    Can I simply say what a relief to find a person that genuinely knows what they’re talking about on the web.
    You certainly understand how to bring an issue to light and make it important.
    More people need to look at this and understand this side of your story.

    It’s surprising you aren’t more popular given that you most certainly possess the gift.

  63. Reply

    Hello there! This is my first comment here so I just wanted
    to give a quick shout out and tell you I really enjoy reading your articles.
    Can you suggest any other blogs/websites/forums that go over the same topics?
    Thanks a lot!

  64. Reply

    I do consider all of the concepts you’ve offered for your post.
    They’re really convincing and can certainly work. Nonetheless,
    the posts are very short for newbies. May you please lengthen them a little
    from subsequent time? Thanks for the post.

  65. Reply

    Hello, Neat post. There’s an issue aloing with your website in internet
    explorer, may test this? IE still is the marketplace leader and a huge component of people wilkl
    omit your wonderful writing due to this problem.

    web site

  66. Reply

    I know this if off topic but I’m looking into starting my own blog and
    was wondering what all is required to get setup? I’m assuming having a blog like yours would cost a pretty penny?

    I’m not very web savvy so I’m not 100% certain. Any suggestions or advice would be greatly appreciated.

    Many thanks

  67. Reply

    I am extremely inspired together with your writing skills
    as well as with the layout for your blog. Is this a paid topic or did you customize it your self?
    Anyway keep up the nice high quality writing, it is rare to see
    a great blog like this one these days..

  68. Reply

    I think what you wrote was very logical. But, consider this,
    what if you wrote a catchier post title? I am not saying your information is
    not good, however what if you added something that makes people want more?

    I mean How To Edit Hosts File in Mac OS is a little plain. You ought to peek
    at Yahoo’s front page and watch how they create article titles to grab viewers to open the links.

    You might try adding a video or a related picture or two to
    grab people interested about what you’ve written.
    In my opinion, it might make your posts a little
    livelier.

  69. Reply

    I do not even know how I ended up here, but I thought this post was great.
    I don’t know who you are but certainly you’re going to a famous blogger if you
    aren’t already 😉 Cheers!

  70. Reply

    I absolutely love your site.. Great colors & theme. Did you build this website yourself?

    Please reply back as I’m trying to create my
    own site and would love to know where you got
    this from or exactly what the theme is named. Many thanks!

  71. Reply

    Good post. I learn something totally new and challenging on sites I stumbleupon every day.

    It will always be helpful to read through content from other
    writers and use something from their websites.

  72. Reply

    whoah this weblog is great i really like reading your posts.
    Keep up the great work! You recognize, many individuals are looking
    around for this information, you can help them greatly.

  73. Reply

    I don’t know whether it’s just me or if everyone
    else encountering problems with your blog. It appears like some of the written text within your content are running off the
    screen. Can somebody else please provide feedback and let
    me know if this is happening to them too? This might be a issue
    with my browser because I’ve had this happen previously.
    Thank you

  74. Reply

    I’m extremely pleased to find this site.
    I wanted to thank you for your time due to this fantastic read!!
    I definitely savored every little bit of it and I have you
    book-marked to look at new information on your web site.

  75. Reply

    We absolutely love your blog and find most
    of your post’s to be just what I’m looking for.

    can you offer guest writers to write content available for you?

    I wouldn’t mind creating a post or elaborating on a few of the
    subjects you write about here. Again, awesome web
    site!

  76. Reply

    Thanks for some other informative blog. The place else
    may just I get that kind of info written in such a perfect approach?
    I have a undertaking that I am simply now working on, and I have been at the look out for such information.

  77. Reply

    Pretty great post. I just stumbled upon your blog
    and wanted to mention that I’ve truly enjoyed surfing around your weblog posts.

    After all I’ll be subscribing on your rss feed and I’m hoping you write once more
    very soon!

  78. Reply

    Does your website have a contact page? I’m having trouble locating
    it but, I’d like to send you an email. I’ve got some creative ideas for your blog you
    might be interested in hearing. Either way, great site and I look forward to seeing
    it grow over time.

  79. Reply

    Hi there! I know this is kind of off topic but I wwas wondering if you knew where I could get a captcha plugin for my
    comment form? I’m using the same blog platform as yours and
    I’m having difficulty finding one? Thanks a lot!
    homepage

  80. Reply

    I’ve been surfing online more than three hours
    today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. Personally, if all webmasters and bloggers
    made good content as you did, the web will be much
    more useful than ever before.

  81. Reply

    Pretty great post. I simply stumbled upon your blog and wanted to mention that I’ve really loved surfing around
    your blog posts. After all I will be subscribing for your rss feed and I hope
    you write once more soon!

  82. Reply

    Oh my goodness! Amazing article dude! Thank you, However I am
    having issues with your RSS. I don’t know why I cannot subscribe to it.
    Is there anybody having the same RSS issues? Anyone that knows the solution will you kindly
    respond? Thanks!!

  83. Reply

    Hey! I just wanted to ask if you ever have any problems with hackers?

    My last blog (wordpress) was hacked and I ended up losing several weeks of
    hard work due to no back up. Do you have any methods to prevent hackers?

  84. Reply

    Hi, i feel that i saw you visited my website thus i
    came to go back the prefer?.I am attempting to in finding things to enhance my site!I suppose its good enough to make use of
    some of your concepts!!

  85. Reply

    You really make it seem so easy with your presentation but I find this topic
    to be really something which I think I would never
    understand. It seems too complicated and extremely broad for me.
    I’m looking forward for your next post, I’ll try
    to get the hang of it!

  86. Reply

    Howdy! Quick question that’s completely off topic.
    Do you know how to make your site mobile friendly? My site looks weird
    when viewing from my iphone4. I’m trying to find a template
    or plugin that might be able to fix this problem.
    If you have any recommendations, please share.
    With thanks!

  87. Reply

    Hi there! This post could not be written any better! Reading this post reminds me of my good old room mate!

    He always kept chatting about this. I will forward this post to him.
    Pretty sure he will have a good read. Thank you for sharing!

  88. Reply

    My partner and I stumbled over here coming from a different
    web page and thought I might as well check things out. I like what I see so
    now i am following you. Look forward to looking into
    your web page yet again.

  89. Reply

    I blog frequently and I really appreciate your
    information. The article has truly peaked my interest.
    I will bookmark your website and keep checking for new details about
    once per week. I subscribed to your Feed as well.

  90. Reply

    You can definitely see your expertise in the work you write.
    The world hopes for even more passionate writers such as you who are not afraid to mention how they believe.
    At all times go after your heart.

  91. Reply

    Woah! I’m really digging the template/theme of this
    blog. It’s simple, yet effective. A lot of times it’s tough to get that “perfect balance” between usability and visual appearance.
    I must say you’ve done a very good job with this. Additionally, the blog loads
    very quick for me on Internet explorer. Superb Blog!

  92. Reply

    Elicent marka fanlar ile artık temiz ve rahat bir hava alacaksınız.
    Market SALT Mühendislik olarak elicent marka fan ürünlerini siz
    değerli müşterilerimize güvenilir ve kaliteli şekilde ulaştırmayı hedefliyoruz.
    Elicent ürünlerini güvenilir şekilde temin ederek sizlere kusursuz bir hizmet sunuyoruz.
    Bilgi almak için hemen sitemizi ziyaret ediniz.

  93. Reply

    Howdy! This post couldn’t be written much better! Looking at this
    post reminds me of my previous roommate! He constantly kept talking about this.
    I most certainly will send this information to him. Fairly certain he’s going to have a very good read.
    I appreciate you for sharing!

  94. Reply

    My programmer is trying to persuade me to move to .net from PHP.

    I have always disliked the idea because of the costs.

    But he’s tryiong none the less. I’ve been using WordPress on a variety
    of websites for about a year and am anxious about switching
    to another platform. I have heard very good things about blogengine.net.

    Is there a way I can import all my wordpress content into it?

    Any help would be really appreciated!

  95. Reply

    Hi! Someeone in myy Faceebook group shared this site with us
    soo I came to check it out. I’m definitely enjoying the information. I’m book-marking annd will be tweeting thbis tto my followers!
    Superb blog and brilliant design.
    webpage

Leave a comment

Your email address will not be published. Required fields are marked *