Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open a terminal and figure out the hostname of your mac. To get the hostname, use the command hostname.

    Code Block
    languagetext
    hostname
    joesLittleMacBookPro.local

    The command returns the hostname of your mac. In the given example the hostname is joesLittleMacBookPro.local.

  2. Open the file /etc/hosts with an editor of your choice - you will edit it in the next step. 
    The file belongs to the system user root . Your user must belong to the group admin - otherwise you cannot save the changes on the file. You will be asked for your password either when opening the file or when trying to save it.

  3. Add these to lines to /etc/hosts :

    Code Block
    languagetext
    title/etc/hosts
    127.0.0.1   <hostname>
    ::1         <hostname>

    Instead of <hostname> use your real hostname.
    Most probably your hosts file already contains entries starting with 127.0.0.1 and with ::1.  Just add the real host name at the end of one line which starts with ::1 and at the end of the line which starts with 127.0.0.1. Make sure to add a space character before the hostname.
    With the given hostname, the two lines could look like this:

    Code Block
    languagetext
    title/etc/hosts
    127.0.0.1   localhost joesLittleMacBookPro.local
    ::1         localhost joesLittleMacBookPro.local
  4. Save the file. The system may ask you for your password.

...