Display name on Mac device can decide how your Mac appears on network and at other places like command line shell. Mac display name can be changed any time. These are the quick steps to change Mac’s display name.
First open “System Preferences” and locate the sharing settings icon as shown below:
Click on sharing and open sharing settings window. Now change the computer’s name to desired value as shown below:
Now open terminal shell and you should see the new name in command prompt. You can also open Finder window and look for the device name. The new name should appear there also. Here is how device name should appear in Finder window.