Unix basics

jvaska

macrumors 6502
Original poster
Feb 18, 2002
432
18
Haiti/NYC
I'm trying to find my etc/hosts/ file folder, if one exists, but I can't find it. What path would I go to find it?

Why you ask? I really hope I don't need to post the problem again...I'm having a horrible, horrible local DNS issue...I can't get to my own website or email...but that's a different story for now.

Thanks, v
 

alex_ant

macrumors 68020
Feb 5, 2002
2,473
0
All up in your bidness
Do you mean /etc/hosts?

Mac OS X doesn't normally use that file - it looks in the netinfo database, which you can access using NetInfo Manager in your Macintosh HD/Applications/Utilities folder. Open up NetInfo Manager and click on "machines" in the middle column. But I wouldn't recommend editing anything unless you know what you are doing.

What ARE you doing?
 

monkeydo_jb

macrumors 6502
Apr 17, 2002
447
0
Columbia, MO
First off, /etc/hosts is a file and not a folder.

Secondly, the /etc directory isn't visible to finder.

I suggest you open a terminal screen (applications->utilities->Terminal)
and type in:

nano /etc/hosts

Edit the file as needed and follow the instructions at the bottom of the window to save and close the file.

I know some people will tell you to use vi, but if you're a beginner, nano is easy-peasy.
 

jvaska

macrumors 6502
Original poster
Feb 18, 2002
432
18
Haiti/NYC
alex_ant said:
Do you mean /etc/hosts?

What ARE you doing?
Ok. Nano and vi were a no go for me so I used Cocktail to show the files and then made the changes using TextMate. It did what it was supposed to do. I was having a problem getting to my own website - I was getting very random results as it would work sometimes and other times it wouldn't. Constant pinging of everything told me that it was all working fine - the problem was on my end...

Now, for whatever reason it does not solve my problem with email. Is there a similar file as /etc/hosts that will allow me to recieve my email properly?

Thanks...v
 

jim.

macrumors 6502
Dec 22, 2004
308
0
C-ville, VA
Are you just assigning names to IP addresses? Then /etc/hosts is the place to do it. Any program should look at it first before going to the DNS. Just be sure not to get rid of your loopback entries. Bad stuff can happen then.

What do you mean by mail problems? I don't think there is a file that has magic_mail_fix_and_work=1

Jim
 

jvaska

macrumors 6502
Original poster
Feb 18, 2002
432
18
Haiti/NYC
jim. said:
Are you just assigning names to IP addresses? Then /etc/hosts is the place to do it. Any program should look at it first before going to the DNS. Just be sure not to get rid of your loopback entries. Bad stuff can happen then.

What do you mean by mail problems? I don't think there is a file that has magic_mail_fix_and_work=1

Jim
Loopback entries? What do they look like? I didn't touch anything...I just added two lines after everything else. It's working, but what kind of 'bad stuff' can happen?

Sucks about my email...what the heck am I going to do? Ack...
 

jim.

macrumors 6502
Dec 22, 2004
308
0
C-ville, VA
jvaska said:
Loopback entries? What do they look like?
Don't worry. If you added stuff to the end of the file you are fine. A loopback would be

127.0.0.1 localhost

A lot of unix work is done with Unix sockets on the loopback device (this falls in line with the philosophy of everything being a network). So the loopback device is a fancy way of specifying your machine to local programs. If you get rid of this sometimes you will see stalling or even crashing programs. I don't know how OSX deals with this, but on Linux and BSD you can really slow your comp to a crawl by getting rid of the loopback entry.

Jim
 

rainman::|:|

macrumors 603
Feb 2, 2002
5,438
2
iowa
It'll be faster when going to your website, since it won't have to resolve the URL on a DNS. How old is the website? If it's new, the DNS probably haven't fully updated yet, and simply waiting will fix the problem. Modifying /etc/hosts for a temporary problem will mean you'll have to change it if your site ever changes IP...
 

jvaska

macrumors 6502
Original poster
Feb 18, 2002
432
18
Haiti/NYC
paulwhannel said:
It'll be faster when going to your website, since it won't have to resolve the URL on a DNS. How old is the website? If it's new, the DNS probably haven't fully updated yet, and simply waiting will fix the problem. Modifying /etc/hosts for a temporary problem will mean you'll have to change it if your site ever changes IP...
Oddly enough, I'm on an ISP/IP that has had problems with my dns in the past. It will go out for hours on end...randomly. The problem was never too severe until I switched servers. It's had enough time for the dns servers to update already...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.