How to Edit the Hosts File in Mac OS X with Terminal

The purpose of this is being able to view you site on our servers before you go live


1.    Launch Terminal, found in /Applications/Utilities/ or launched through Spotlight

2.    Type the following command at the prompt:
       sudo nano /private/etc/hosts

3.    Enter the administrator password when requested, you will not see it typed on screen as usual with the command line

4.    Once the hosts file is loaded within nano, use the arrow keys to navigate to the bottom of the hosts file to make your modifications , to point your site to our servers you nedd to add ip which is located in control panel
       example 192.168..1

5.    When finished, hit Control+O followed by ENTER/RETURN to save changes to /private/etc/hosts, then hit Control+X to exit out of nano

6.    Quit out of Terminal when finished

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Error Page Codes

This tutorial will show you a few of the most common error codes a server may return. There are...

How to Clear Your Cache in Internet Explorer

This tutorial will assist you with clearing your cache, which will help your computer run better....

How to do a Ping

The purpose of this tutorial is to teach you how to do a ping. Pinging is a command which tells...

How to do a TELNET on a PC (Windows) OS

From time to time you may need to perform an operation called "TELNET".You can use TELNET to...

How to do a Tracert

This tutorial will show you how to run a trace route on a Window operating system. If you are...

Our official partners