HOSTNAME(1)

NAME
hostname - write or set system hostname

SYNOPSIS
hostname [-s] [hostname]

DESCRIPTION
hostname writes the system hostname, or sets the system hostname to hostname if specified.

The options are as follows:

-s, --short
    Write the hostname up to but not including the first period.

EXIT STATUS
hostname will exit 0 on success and non-zero otherwise.

SEE ALSO
gethostname(2), sethostname(2), hostname(5)