HOSTNAME(1) User Commands HOSTNAME(1)

NAME

hostname - set or print name of current host system

SYNOPSIS


/usr/bin/hostname [-d | -f] [domain | hostname]
 

DESCRIPTION

With no arguments th hostname command prints the name of the current host, as given before the login prompt. If -d is passed the hostname command will instead print out the name of default domain, and if -f is passed the hostname will be fully-qualified.
 
The super-user can set the hostname (or domain name if -d is passed) by passing the new value as an additional argument. The FQDN (fully qualified domain name) cannot be set using the hostname command.

SEE ALSO

uname(1), attributes(5)
May 10, 2016