HOSTNAME(1) User Commands HOSTNAME(1)

NAME

hostname - set or print name of current host system

SYNOPSIS


/usr/bin/hostname [-fls | name-of-host]
 

DESCRIPTION

The hostname command prints the name of the current host, as given before the login prompt. The super-user can set the hostname by giving an argument.
 

OPTIONS

For compatibility long arguments are also supported.
 
-f, --fqdn print out the FQDN (fully qualified domain name).
 
-l, --long alias for -f, --fqdn.
 
-s, --short strip domain information from hostname.
 
The hostname command cannot be used to set the fqdn, long or short name.
 

SEE ALSO

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