Im having a strange problem with the terminal in OS X.
When I open the terminal the username at the command prompt is:
I can't pinpoint when this first started or why unfortunately. I usually use iTerm for web development purposes but this also occurs in the normal OS X Terminal app.
Any ideas/help would be really appreciated.
Update: Thanks to @fayadfami and @aliasgar for the correct answers and steering me in the right direction. Also this forum post helped http://forums.macrumors.com/showthread.php?t=152407 The extract from the right post:
Having run into the exact same issue myself, and having come across this thread while >attempting to figure it out, I thought I'd post the answer.
OS X is initially setting your hostname to what's set for your Computer Name in Sharing; >however, if you're set up for DHCP and you match a current lease on your DHCP server (i.e., >match the IP address of another recent user), OS X will then set your hostname to whatever >the DHCP server currently has for that lease.
This freaked me out incredibly at first, as I had just reformatted (having just purchased my >first Mac and wanting to see how the installer worked) and knew I had not yet changed the >Computer Name in Sharing -- yet my system hostname at the Terminal prompt was indeed changed >to what I had previously set, pre-format. I grepped around, not finding the name anywhere >save log entries; I thought either the format didn't actually properly wipe everything, or I >was losing my mind. Finally I logged into my router (it's a Linksys WRT54GS running >OpenWRT), and found the hostname in the current leases file. I then manually set my Mac's IP >to something different, and volia! -- the hostname was back to what I expected.
I hope this helps save someone from the same paranoia I went through.