Jay from the Bay

Q: Terminal Host Name unknown####

Whenever i log into my termianl i noticed that i see that my hostname says unkown040ccedf8e88: ny name, is this normal? because i know that my friends MPA's have a different host name, and when i type in "hostname" on terminal, it gives me that unkown###

MacBook Air, Mac OS X (10.7.3)

Posted on Mar 21, 2012 1:58 AM

Close

Q: Terminal Host Name unknown####

  • All replies
  • Helpful answers

  • by Jeffrey Jones2,

    Jeffrey Jones2 Jeffrey Jones2 Mar 21, 2012 7:56 AM in response to Jay from the Bay
    Level 6 (8,639 points)
    Mar 21, 2012 7:56 AM in response to Jay from the Bay

    Yes, that is normal. The hostname is whatever is set on your local network. You can change the prompt if you want. man bash; see the section about PS1.

  • by Eric.,

    Eric. Eric. Mar 21, 2012 9:21 AM in response to Jay from the Bay
    Level 6 (12,260 points)
    Mar 21, 2012 9:21 AM in response to Jay from the Bay

    You can change the hostname in the System Preferences of Lion (client):

     

    Go to:

    - System Preferences -> Sharing

    - See "computer name" at the top, enter something other than what's there.

    - If you click "Edit" underneath, you should get something like hostname.domain. I usually see: computername.local

     

    When you use hostname, you should get the value given when you click "Edit", e.g computername.local

     

    It could be that what's currently there is too long and/or contains an illegal character. While a bit old and refers to a specific case of binding to Active Directory, according to this:

    Use computer names and passwords that are less than 16 characters in length, and which only contain alphanumeric (A–Z, a–z), numbers (0–9), - (dash) and/or _ (underscore) characters when binding with Directory Utility

     

    I would try a new computer name in accordance with that those rules to see if it corrects the problem: alphanumeric (A–Z, a–z), numbers (0–9), - (dash) and/or _ (underscore)

     

    I don't use spaces either.