# Terminal and hostname issue



## bitlord (Mar 29, 2010)

I named my Macbook one thing but when I open the terminal it says something else. Not only that it changed from the last time I was in the terminal. My user name is different as well. How is this possible? 

If I use the GUI on anther machine it see the the name I named it, but if I use the command line it see's only the name in the terminal.

What is wrong with my Mac? How can I fix it 

*In the terminal I see This: *h102:~ tone$
Translation: h102=hostname, ~=home directory, tone=username
I named the MacBook L and am loged is as username=Rich.

*Some terminal out put:*
h102:~ tone$ hostname
h102.DN.com
h102:~ tone$ uname
Darwin
h102:~ tone$ id
uid=501(tone) gid=20(staff) groups=20(staff),98(_lpadmin),101(com.apple.sharepoint.group.1),81(_appserveradm),79(_appserverusr),80(admin),102(com.apple.sharepoint.group.2)

I have seen the Mac change the host name before why does it do this?
I have a background in UNIX and Linux system administration and I also do some Windows as well. In my experience the hostname and the computer name are one and the same or at least set that way. Is this a Mac thing? How can I, make them the same and stop my Mac from changing it. Even the user name is different.

If I ssh into my Mac I have to do this:
ssh tone@h102
ssh rich@L -- will not work only the above will work.

If I use a GUI, on anther non-Mac, to access the Mac it shows up as L.

Anyway I want the computer names to be the same, no more L and h102. I want the usernames to be the same no more Rich and tone being the same account. I just want constancy. Where do I make the change in my Mac to make this happen?

I have also posted this question on the apple forum. Link below.
http://discussions.apple.com/thread.jspa?messageID=11286869#11286869

Any help would be great thamks


----------



## simbalala (Mar 29, 2010)

Read through this...

http://osxdaily.com/2006/12/11/how-to-customize-your-terminal-prompt/

if you can't get what you want post back.

The host name is whatever you set in the Sharing preferences panel for the computer name.


----------



## bitlord (Mar 29, 2010)

This is good info, but I'm not asking for info on how to customize the shell. I don't think you read my question. I'm asking why the GUI says one this and the terminal say anther.


----------

