Whenever i login in my my terminal session its shows default hostname is “ localhost ” in my OSX mountain lion, well i searched around the apple support and other websites then i found changing hostname is really simple but sometimes it may be couse of problem in binding active directory
Change Hostname :
sudo scutil --set HostName AlokMac sudo scutil --get HostName AlokMac
restart your terminal session to take effect
Change active directory binding setting
If you dont use network login or part of any active directory kind of service the simple leave these steps just above step to change your hostname and exit
- open system preferences
- click on user and group
- click on login option
- open network server setup
- open directory utility
- and choose active directory
- from that you can manually setup your computername and other AD binding settings
<table class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style="text-align: center;">
<a style="margin-left: auto; margin-right: auto;" href="http://3.bp.blogspot.com/-qNIqwVO_eOY/UFk5CwCkMuI/AAAAAAAAHPg/MY1y-1HXVxY/s1600/Screen+Shot+2012-09-19+at+8.27.15+AM.png"><img alt="" src="http://3.bp.blogspot.com/-qNIqwVO_eOY/UFk5CwCkMuI/AAAAAAAAHPg/MY1y-1HXVxY/s640/Screen+Shot+2012-09-19+at+8.27.15+AM.png" width="640" height="488" border="0" /></a>
</td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">
Change Login Optons
</td>
</tr>
</table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<table class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;" cellspacing="0" cellpadding="0" align="center">
<tr>
<td style="text-align: center;">
<a style="margin-left: auto; margin-right: auto;" href="http://4.bp.blogspot.com/-__v9mjjzcj4/UFk5VgTP0fI/AAAAAAAAHPo/0POb785Yoys/s1600/Screen+Shot+2012-09-19+at+8.27.59+AM.png"><img alt="" src="http://4.bp.blogspot.com/-__v9mjjzcj4/UFk5VgTP0fI/AAAAAAAAHPo/0POb785Yoys/s1600/Screen+Shot+2012-09-19+at+8.27.59+AM.png" border="0" /></a>
</td>
</tr>
<tr>
<td class="tr-caption" style="text-align: center;">
Active Directory binding settings
</td>
</tr>
</table>
<p>
Hope it was helpful for you<br /> thanks for reading !
</p>