macOS / binaries /

hostname

/bin/hostname
Set or print name of current host system

The hostname utility prints the name of the current host. The super-user can set the hostname by supplying an argument.

source: man