how to change the HostName in mac OSX [ how to ]

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

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
Change Login Optons
Active Directory binding settings

Hope it was helpful for you
thanks for reading !

Tagged With : -