I've got a handleful of macs (all with unique names) and on occasion it prompt a notice about saying another computer on the network as this name and adds a (2) or (3) to my mac.
How can I set the host name from the command line?
There is a couple ways to go about solving this problem.
The immediate change is to to open up Terminal, and issue the command
The next thing to do is to
Add the following line, followed by Ctrl+O, and then Ctrl+X
Yes you can :
to change the computer name :
To check if everything is okay :