
Open the Terminal (located in /Applications/Utilities), or SSH into the Mac that you will be changing this setting on. Type the following command, replacing “name” with the name you want for your Mac and press enter:
Type the following command, replacing “name” with the name that you want for your local network to Bonjour-based services:
Set how the computer is displayed when connecting through SSH, and inside Terminal by typing the following command, replacing “name” with the name you want to use to display in the Terminal and when connecting to the machine over SSH:
Note: When specifying a LocalHostName and HostName, you should not have spaces in the name. After you press return for each of the items above, you will be prompted to enter your administrator password to authenticate the changes.
Now, you can use these commands in Terminal to ensure that the proper items were set, using HostName, LocalHostName or ComputerName. Enter each of these separately:
You can flush the DNS cache with the following but this is not necessary:
Note: By default, there is no “Host Name” set on a Mac.
Leave A Comment
Related Posts
Category: Hardware
This EleTab Dual Monitor Mount stand gives you back your desk by eliminating the stands from both of your monitors. This EleTab Dual Monitor [...]
Category: Hardware
I've been a fan of Dell monitors for a while now, currently I use three Dell Monitors connected to a Mac mini. Two of them [...]
Category: General
A client had been maintaining their own WordPress website and decided to update the Elementor Pro plugin. Now, the site had not been touched [...]