editing etc/hosts/ file on Snow Leopard

Joined
Nov 28, 2007
Messages
49
Reaction score
0
Points
6
Your Mac's Specs
MacBook black 2.2GHz 160GB HD 4GB RAM
I love my Mac, but I don't know Linux. I need to edit the etc/hosts/ file. Here's the deal:

I transferred a domain to GoDaddy to move an existing blog from Wordpress.com. It was originally set up as a Linux hosting account. When they had problems transfgerring the blog, one of their techs said moving it to a Windows hosting account would solve the problems (I should've known better the moment I heard the word "Windows). I did. Nothing but problems thereafter. I finally got then to migrate my domain back to Linux. At the moment, though, both versions still exist.

I need to go into the etc/hosts/ file to have the old domain name point to the new IP address.

Only I don't know how to do that, and the GoDaddy techs say they can't help.

Is there anyone here who knows their way around Snow Leopard well enough to tell me how to do this?

.g
 
Joined
Jul 2, 2007
Messages
3,494
Reaction score
204
Points
63
Location
Going Galt...
Your Mac's Specs
MacBookAir5,2:10.13.6-iMac18,3:10.13.6-iPhone9,3:11.4.1
Use the vi editor ie:

vi /etc/hosts

I'd Google vi or vim editor first so you have an idea of how it works.

I'm make a backup first ie:

cp -p /etc/hosts /etc/hosts.03-19-2010
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,770
Reaction score
2,110
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
If you only want to make this change locally for yourself..then open up the Terminal and type:
Code:
sudo vi /etc/hosts
Enter your password when prompted.

Use the cursor to go to the bottom of the file, hit 'i' for insert mode, enter the text
Code:
xxx.xxx.xxx.xxx             domain.name
following the other entries there, then hit ESC to get out of insert mode. Now type ":wq". Yes that's, a colon followed by w, q and then ENTER to Write and Quit.

You should now be able to do
Code:
ping domain.name
and it should go to the IP address you just setup.

Regards
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top