What file stores the computer name?

Discussion in 'macOS' started by chuanist, Nov 2, 2009.

  1. chuanist macrumors newbie

    Joined:
    May 27, 2009
    #1
    I think I messed up: when I was turning on web sharing I also renamed the computer. Now it can't find localhost. I suspect that the old name is being used to look for localhost. Can anyone tell me where the computer name is stored so I can see if it changed from the old name or not?

    Right now when I put http://localhost or 127.0.0.1 in a browser Safari says:

    Safari can’t open the page “http://localhost/” because Safari can’t connect to the server “localhost”.

    Thanks,

    Glen
     
  2. SHankara macrumors member

    Joined:
    Oct 5, 2007
    #2
    Go back to sharing rechange the name , see what happens.Or you can try cli tool systemsetup.


    the syntax would be:
    systemsetup [-getcomputername] [-setcomputername computername]

    See if that would fix the problem.As for localhost it should be okay,its just an address.Check the hosts file in /etc see if localhost is still there,but dont modify the top of the file.
     

Share This Page