Apple Mac OS X Server Network Card User Manual


 
Chapter 6 Setting Network Preferences 79
Managing the Computer, Host, and Bonjour Names
These names are used by networking applications to identify a computer.
Computer Name
The computer name is the local name of a computer. This name is typically assigned to
the computer when the operating system is installed. Use the serversetup tool to view
or modify the computer name.
To display the computer name:
$ sudo systemsetup -getcomputername
or
$ sudo networksetup -getcomputername
or
$ serversetup -getComputername
To change the computer name:
$ sudo systemsetup -setcomputername
computername
or
$ sudo networksetup -setcomputername
computername
or
$ sudo serversetup -setComputername
computername
To validate a computer name:
$ serversetup -verifyComputername
computername
Hostname
The host name is a unique name that corresponds to a unique hardware MAC address.
It is the name that the network uses to identify a device attached to the network. Use
the serversetup tool to view or modify the host name.
To display the server’s local host name:
$ serversetup -getHostname
To change the server’s local host name:
$ sudo serversetup -setHostname
hostname
Note: You can also set and get the host name using snmpd and scutil tools.