You can change your hostname quickly and easily using Terminal.app (Applications –> Utilities –> Terminal).
To do so, perform the following steps:
sudo scutil –set HostName myname.local
Ex. sudo scutil –set HostName MyTechForum
It will prompt you to enter your password. After doing so, your hostname will be set.
To confirm it’s working as expected, run the hostname command again.
hostname
MyTechForum