Adding a record to you hosts file in OS X Leopard

Updating a hosts file on a mac in OS X Leopard is a little more difficult than a PC.http://www.apple.com/downloads/macosx/internet_utilities/hostal.htmlIt is possible to edit the hosts file direct but it is a bit techie on OS X. You need to do EXACTLY the followingYou must have access to log in as the root user - http://support.apple.com/kb/HT1528?viewlocale=en_US

  1. Log out using the apple menu (top left)
  2. Log in as the root user
  3. Open Applications > utility > Command ( this is the command prompt for the underlying unix of os x)
  4. Type the following
    1. cd /etc
    2. vi hosts
    3. e (press the letter e)
    4. use down arrow to get below last item in the list
    5. right arrow to get to nd of row
    6. press a (the letter a)
    7. press return
    8. type ip tab webaddress you want adding eg.
      1.  78.136.0.162      www.livelinknewmedia.com (there is a tab between the 162 and www
    9. Press escape
    10. Type :x
    11. You have edited the file now
  5.  You must flush your dns by typing
  6. sudo dscacheutil –flushcache
  7. Done – you should be able to see the site you added now.

 


Your rating: None