Unix basics

Discussion in 'General Mac Discussion' started by jvaska, Mar 10, 2005.

  1. jvaska macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #1
    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
     
  2. alex_ant macrumors 68020

    alex_ant

    Joined:
    Feb 5, 2002
    Location:
    All up in your bidness
    #2
    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?
     
  3. monkeydo_jb macrumors 6502

    Joined:
    Apr 17, 2002
    Location:
    Columbia, MO
    #3
    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.
     
  4. jvaska thread starter macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #4
    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
     
  5. jim. macrumors 6502

    Joined:
    Dec 22, 2004
    Location:
    C-ville, VA
    #5
    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
     
  6. jvaska thread starter macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #6
    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...
     
  7. jim. macrumors 6502

    Joined:
    Dec 22, 2004
    Location:
    C-ville, VA
    #7
    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
     
  8. jvaska thread starter macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #8
    Thanks...I left those alone. Actually, things feel more zippy for some reason. ???
     
  9. rainman::|:| macrumors 603

    rainman::|:|

    Joined:
    Feb 2, 2002
    Location:
    iowa
    #9
    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...
     
  10. jvaska thread starter macrumors 6502

    Joined:
    Feb 18, 2002
    Location:
    Haiti/NYC
    #10
    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...
     

Share This Page