From the Finder:
Finder -> Go -> Go to Folder...
and enter
which is tildaslash.ssh
If you want to use the Terminal, then you would
You can use something like TextEdit, TextWrangler, Smultron to edit the file. If using the terminal you can use nano, vi, vim, emacs to edit the file.
The only problem with some of these editors is finding an explicit line. As I seem to recall, the known_host file message gives a line number. Since the lines in the known_hosts file are very long, a lot of these editors line wrap so just counting visible lines is not accurate.
Message was edited by: BobHarris
  1. Hosts File For Mac Shortcut
  2. Mac Etc File
  3. Hosts File For Mac Download

Jan 11, 2009 1:43 PM

Back in November (2016) we wrote an article on how to edit your hosts file on your Windows computer. In that article we covered a few things such as what a hosts file is and why you should make changes to your computer’s hosts file.

How to Edit Hosts File on Mac. By editing Mac hosts file, it’s possible to emulate DNS change and set the desired IP for a domain name. With the hosts file you can overwrite any DNS values set by your Internet service provider. This is helpful if your domain name is not yet registered or not pointed to a hosting account, but you want to preview your website. In case the hosts file does not save, we overwrite the content, the user moved that hosts file to the desktop or another directory to edit. Then copy to the etc directory to overwrite the existing hosts file. Method 2: Edit the hosts file on the Mac via Terminal. For Mac OS, we have more ways to fix hosts file via Terminal. Editing the Hosts File on a MAC. To edit the host file, you must first open it by double clicking it. You will notice that it is a simple file that contains just a few lines of text and characters such as pound and hash tags. The file also list the IP address of the localhost and broadcasthost. Before making changes on the hosts file. The computer file hosts is an operating system file that maps hostnames to IP addresses.It is a plain text file. Originally a file named HOSTS.TXT was manually maintained and made available via file sharing by Stanford Research Institute for the ARPANET membership, containing the hostnames and address of hosts as contributed for inclusion by member organizations.

For those of you who haven’t read that article, a hosts file is a file on your computer that allows you to map hostsnames to IP addresses. In simpler terms, it can give you the capability to test a website on a new IP before updating the DNS on that domain. For example, we use this process and prefer it over temporary URLs here at PeoplesHost for testing purposes when migrating new customers over to our environments. This allows us to test the website after it has been migrated to make sure there are no errors and the website is displaying properly.

HOW TO CHANGE THE HOSTS FILE ON A MAC COMPUTER

For

Changing the hosts file on a MAC computer is a fairly straightforward process for anyone that has used Terminal (or any other similar command line application or tool). If you haven’t used Terminal before this process will be new to you, but don’t be afraid because this tutorial is beginner friendly.

Hosts File For Mac Shortcut

Follow these steps to edit your hosts file:

Mac Etc File

  1. Open Terminal by pressing CTRL + Spacebar or open the Spotlight search and search for “Terminal
  2. Press the Enter key on your keyboard to open Terminal
  3. Type sudo nano /etc/hosts
  4. Type in the Password to your computer (it won’t show the text in Terminal, but the text is actually being entered). Once you have typed your Password press the Enter key
  5. Press the DOWN arrow key to get to the bottom of the hosts file
  6. Add your Shared IP along with your domain to the hosts file
  7. Hold the CONTROL button and press the letter O (CTRL + O) and press ENTER
  8. Hold the CONTROL button on your keyboard and press the letter X (CTRL + X)
Once you’ve made these changes to your hosts file you will be able to open your computer’s browser and access your domain as if it were live on the internet. After you’ve tested your domain and updated your DNS you’ll want to be sure to follow those steps again to remove the lines you just saved into your hosts file.Edit host file

If you have any questions about this process don’t hesitate to reach out to support.

Hosts File For Mac Download

Looking for reliable Windows or Linux hosting with Award Winning Customer Support?
Grab your hosting today with a 20% discount. All plans come with our 60 Money Back Guarantee!