.LP
.B domainname
will print the NIS domainname of the system.
-.BR domainname
+.B domainname
uses the
.BR gethostname (2)
function, while
-.BR ypdomainname
+.B ypdomainname
and
-.BR nisdomainname
+.B nisdomainname
use the
.BR getdomainname (2).
.LP
.B dnsdomainname
will print the domain part of the FQDN (Fully Qualified Domain Name). The
complete FQDN of the system is returned with
-.BR "hostname \-\-fqdn"
+.B hostname \-\-fqdn
(but see the warnings in section
-.B "THE FQDN"
+.B THE FQDN
below).
.SS "SET NAME"
When called with one argument or with the
.B \-\-file
option, the commands set the host name or the NIS/YP domain name.
-.BR hostname
+.B hostname
uses the
.BR sethostname (2)
function, while all of the three
-.BR domainname,
-.BR ypdomainname
+.BR domainname ,
+.B ypdomainname
and
-.BR nisdomainname
+.B nisdomainname
use
.BR setdomainname (2).
Note, that this is effective only until the next reboot.
It is not possible to set the FQDN or the DNS domain name with the
.B dnsdomainname
command (see
-.B "THE FQDN"
+.B THE FQDN
below).
.LP
The host name is usually set once at system startup in
.IR ursula.example.com .
It is usually the hostname followed by the DNS domain name (the part
after the first dot). You can check the FQDN using
-.B "hostname \-\-fqdn"
+.B hostname \-\-fqdn
or the domain name using
.BR "dnsdomainname" .
.LP
mobile environment, then it may either have multiple FQDNs/domain names
or none at all. Therefore avoid using
.BR "hostname \-\-fqdn" ,
-.BR "hostname \-\-domain"
+.B hostname \-\-domain
and
.BR "dnsdomainname" .
-.BR "hostname \-\-ip-address"
+.B hostname \-\-ip-address
is subject to the same limitations so it should be avoided as well.
.SH OPTIONS
output.
.TP
.I "\-b, \-\-boot"
-Always set a hostname; this allows the file specified by \fI-F\fR to be
-non-existant or empty, in which case the default hostname \fIlocalhost\fR
+Always set a hostname; this allows the file specified by \fI\-F\fR to be
+non-existent or empty, in which case the default hostname \fIlocalhost\fR
will be used if none is yet set.
.TP
.I "\-d, \-\-domain"
not the DNS domain name. Use
.B dnsdomainname
instead. See the warnings in section
-.B "THE FQDN"
+.B THE FQDN
above, and avoid using this option.
.TP
.I "\-f, \-\-fqdn, \-\-long"
short host name and the DNS domain name. Unless you are using bind or NIS
for host lookups you can change the FQDN and the DNS domain name (which is
part of the FQDN) in the \fI/etc/hosts\fR file. See the warnings in section
-.B "THE FQDN"
+.B THE FQDN
above und use
-.BR "hostname \-\-all-fqdns"
+.B hostname \-\-all-fqdns
instead wherever possible.
.TP
.I "\-F, \-\-file filename"
.I "\-i, \-\-ip-address"
Display the network address(es) of the host name. Note that this works only
if the host name can be resolved. Avoid using this option; use
-.BR "hostname \-\-all-ip-addresses"
+.B hostname \-\-all-ip-addresses
instead.
.TP
.I "\-I, \-\-all-ip-addresses"
Display all network addresses of the host. This option enumerates all
configured addresses on all network interfaces. The loopback interface and IPv6
-link-local addresses are omitted. Contrary to option \fI-i\fR, this option
+link-local addresses are omitted. Contrary to option \fI\-i\fR, this option
does not depend on name resolution. Do not make any assumptions about the
order of the output.
.TP