Follow

Editing your Hosts Files on Mac OS-X Operating Systems

Editing your Hosts Files on Mac OSX Operating Systems

 

To access your websites staging environment from your personal computer you will have to edit the hosts files on your computer. You can do this by accessing your computers terminal, then by adding the entry provided by Demac Media to allow your computer to access the staging environment.

You can access your terminal in Mac OSX operating system in one of the two following ways:

Access from search bar - Recommended 

To access your Terminal from your search bar, simply click on the search icon located at the top-right side of your screen, and start to type in Terminal. This should appear quite quickly in your search results:

 Screen_Shot_2013-07-18_at_12.58.55_PM.png

Once you click on Terminal, then your terminal window will appear:

 Screen_Shot_2013-07-18_at_12.59.00_PM.png

Access your Terminal from the Utilities Folder via Dock or Finder:

 

You can also access your Terminal from the Utilities folder found in your applications folder. To do so, start by selecting your Applications Folder either from your dock, or your finder:

Dock:

Screen_Shot_2013-07-18_at_12.59.07_PM.png 

Screen_Shot_2013-07-18_at_12.59.14_PM.png

Finder:

Screen_Shot_2013-07-18_at_12.59.20_PM.png

Expand the utilities folder:

Screen_Shot_2013-07-18_at_12.59.29_PM.png 

And click on Terminal to access your terminal:

Your terminal is a simple text window like you see below. The following steps will show you how to access your hosts-files through this terminal, and how to properly add the Demac Media Entry in order to access your staging environment:

Screen Shot 2013-07-18 at 12.59.00 PM.png

First, you need to provide a command to edit your hosts file. Do this by pasting the following code into the Terminal that you just opened:

            sudo nano /private/etc/hosts

Copy the code above into the empty space at the end of the entry like so…

Screen_Shot_2013-07-18_at_12.59.42_PM.png

…then press ENTER.

You are now prompted to input your password (login password for your computer). Do so, and click enter to gain access to your hosts file.

PLEASE NOTE that your password will not appear while you are typing it for security reasons:

Screen_Shot_2013-07-18_at_12.59.52_PM.png

You will now see your hosts file, and you want to add your Demac Provided entry(ies) as an alternate line item below the default line items like so:

Screen_Shot_2013-07-18_at_12.59.57_PM.png

A completed example can be seen below: PLEASE NOTE you may have to use the arrows on your computer to navigate the cursor, as this is a text based page.

Screen_Shot_2013-07-18_at_1.00.02_PM.png

When you are finished click Control + o to save, then press Enter, and then click Control + x to exit.

You now have access to your staging environment from your personal Mac computer.

SPECIAL NOTES:


If you do not have a password to input in step 2 above, simply create an account on your Mac by clicking on System Preferences/Users & Groups and simply create a new account. The password for the new account will be the one used in Step 2.

Screen_Shot_2013-07-18_at_1.00.07_PM.png 

Written by: Jim Cover

Customer Success Manager at Demac Media 

Comments

Powered by Zendesk