Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >

KB-2039: How to edit the hosts file (and flush the DNS) on Mac OS X

Mac & PC Management Service ,  

12 April,16 at 11:37 AM

Applies to: All versions of OS X

How can the hosts file be edited in Mac OS X?

  1. Login to the Mac with an account that has local admin privileges.
  2. Open the following file with a suitable text editor:
    • /etc/hosts
    • The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g.   localhost). 
  3. Append any new mappings underneath the default ones.
  4. Save and close the hosts file.
  5. Flush the DNS cache to have the host file changes to take immediate effect.

(External links provided as a courtesy)

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.