When setting up a new mac, you will have the default lengthy name that would appear on your terminal. Here is how to change the computer name in mac
On your terminal:
sudo scutil HostName short-name
Where ‘short-name’ is what ever you want to be your computer name
That is it!