Source Compatibility Guide

hostname

Displays the name of your machine and allows you to rename it. This command is not available in the base release. uname -n in the SunOS 5.x release displays the machine name, but does not allow the super-user to rename the machine.