Computer name

Changing the computers name is done using the scutil command. To get the computers current name use the following commands.

    sudo scutil --get ComputerName
    sudo scutil --get LocalHostName
    sudo scutil --get HostName
        

To set the computer name use the following commands.

    sudo scutil --set ComputerName "computer name"
    sudo scutil --set LocalHostName "local hostname"
    sudo scutil --set HostName "hostname"