Commit 2466c758 authored by Bernd Eckenfels's avatar Bernd Eckenfels

hostname: modernized man page

parent 8f124a70
.TH HOSTNAME 1 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual" .TH HOSTNAME 1 "2013\-08\-29" "net\-tools" "Linux System Administrator's Manual"
.SH NAME .SH NAME
hostname \- show or set the system's host name hostname \- show or set the system's host name
.br .br
domainname \- show or set the system's NIS/YP domain name
.br
dnsdomainname \- show the system's DNS domain name dnsdomainname \- show the system's DNS domain name
.br .br
nisdomainname \- show or set system's NIS/YP domain name domainname \- show or set the system's NIS/YP domain name
.br .br
ypdomainname \- show or set the system's NIS/YP domain name nisdomainname \- show or set system's NIS/YP domain name
.br .br
nodename \- show or set the system's DECnet node name nodename \- show or set the system's DECnet node name
.br
ypdomainname \- show or set the system's NIS/YP domain name
.SH SYNOPSIS .SH SYNOPSIS
.B hostname .B hostname
.RB [ \-v ] .RB [ \-v ]
.RB [ \-a ] .RB [ \-s | \-\-short ]
.RB [ \-\-alias ]
.RB [ \-d ] .PP
.RB [ \-\-domain ] .B hostname
.RB [ \-f ] .RB [ \-v ]
.RB [ \-\-fqdn ] .RB [ \-a | \-\-alias ]
.RB [ \-i ] .RB [ \-d | \-\-domain ]
.RB [ \-\-ip\-address ] .RB [ \-f | \-\-fqdn | \-\-long ]
.RB [ \-\-long ] .RB [ \-i | \-\-ip\-address ]
.RB [ \-s ]
.RB [ \-\-short ] .PP
.RB [ \-y ] .B hostname
.RB [ \-\-yp ] .RB [ \-v ]
.RB [ \-\-nis ] .RB [ \-y | \-\-yp | \-\-nis ]
.RB [ \-n ] .RB [ \-n | \-\-node ]
.RB [ \-\-node ]
.PP .PP
.B hostname .B hostname
.RB [ \-v ] .RB [ \-v ]
.RB [ \-F\ filename ] .RB [ \-F\ filename | \-\-file\ filename ]
.RB [ \-\-file\ filename ] .RI [ newname ]
.RB [ hostname ]
.PP .PP
.B domainname .B domainname
.RB [ \-v ] .RB [ \-v ]
.RB [ \-F\ filename ] .RB [ \-F\ filename | \-\-file\ filename ]
.RB [ \-\-file\ filename ] .RI [ newname ]
.RB [ name ]
.PP .PP
.B nodename .B nodename
.RB [ \-v ] .RB [ \-v ]
.RB [ \-F\ filename ] .RB [ \-F\ filename | \-\-file\ filename ]
.RB [ \-\-file\ filename ] .RI [ newname ]
.RB [ name ]
.PP .PP
.B hostname .B hostname
.RB [ \-v ] .RB [ \-v | \-\-verbose ]
.RB [ \-h ] .RB [ \-h | \-\-help ]
.RB [ \-\-help ] .RB [ \-V | \-\-version ]
.RB [ \-V ]
.RB [ \-\-version ]
.PP .PP
.B dnsdomainname .B dnsdomainname
...@@ -124,12 +118,8 @@ command (see ...@@ -124,12 +118,8 @@ command (see
below). below).
.LP .LP
The host name is usually set once at system startup in The host name is usually set once at system startup by reading the
.I /etc/rc.d/rc.inet1 contents of a file which contains the host name, e.g.
or
.I /etc/init.d/boot
(normally by reading the contents of a file which contains
the host name, e.g.
.IR /etc/hostname ). .IR /etc/hostname ).
.SS THE FQDN .SS THE FQDN
...@@ -142,16 +132,17 @@ with this command. The FQDN of the system is the name that the ...@@ -142,16 +132,17 @@ with this command. The FQDN of the system is the name that the
returns for the host name. returns for the host name.
.LP .LP
Technically: The FQDN is the name Technically: The FQDN is the canonical name returned by
.BR gethostbyname (2) .BR gethostbyname2 (2)
returns for the host name returned by when resolving the result of the
.BR gethostname (2). .BR gethostname (2)
The DNS domain name is the part after the first dot. name. The DNS domain name is the part after the first dot.
.LP .LP
Therefore it depends on the configuration (usually in Therefore it depends on the configuration (usually in
.IR /etc/host.conf ) .IR /etc/host.conf )
how you can change it. Usually (if the hosts file is parsed before DNS or how you can change it. If
NIS) you can change it in .B hosts
is the first lookup method, you can change the FQDN in
.IR /etc/hosts . .IR /etc/hosts .
...@@ -161,22 +152,18 @@ NIS) you can change it in ...@@ -161,22 +152,18 @@ NIS) you can change it in
Display the alias name of the host (if used). Display the alias name of the host (if used).
.TP .TP
.I "\-d, \-\-domain" .I "\-d, \-\-domain"
Display the name of the DNS domain. Don't use the command Display the name of the DNS domain (this is the FQDN without the segment up
.B domainname to the first dot). This is equivalent to using the
to get the DNS domain name because it will show the NIS domain name and
not the DNS domain name. Use
.B dnsdomainname .B dnsdomainname
instead. command.
.TP .TP
.I "\-F, \-\-file filename" .I "\-F, \-\-file filename"
Read the host name from the specified file. Comments (lines starting with Read the new host name from the specified file. Comments (lines starting with
a `#') are ignored. a `#') are ignored.
.TP .TP
.I "\-f, \-\-fqdn, \-\-long" .I "\-f, \-\-fqdn, \-\-long"
Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a Display the FQDN (Fully Qualified Domain Name). A FQDN consists of name
short host name and the DNS domain name. Unless you are using bind or NIS including the DNS domain.
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.
.TP .TP
.I "\-h, \-\-help" .I "\-h, \-\-help"
Print a usage message and exit. Print a usage message and exit.
...@@ -203,11 +190,13 @@ Display the NIS domain name. If a parameter is given (or ...@@ -203,11 +190,13 @@ Display the NIS domain name. If a parameter is given (or
.B \-\-file name .B \-\-file name
) then root can also set a new NIS domain. ) then root can also set a new NIS domain.
.SH FILES .SH FILES
.B /etc/hostname
.B /etc/hosts .B /etc/hosts
.B /etc/host.conf
.SH AUTHOR .SH AUTHOR
Peter Tobias, <tobias@et\-inf.fho\-emden.de> Peter Tobias, <tobias@et\-inf.fho\-emden.de>
.br .br
Bernd Eckenfels, <net\-tools@lina.inka.de> (NIS and manpage). Bernd Eckenfels, <net\-tools@lina.inka.de> (NIS and manpage).
.br .br
Steve Whitehouse, <SteveW@ACM.org> (DECnet support and manpage). Steve Whitehouse, <SteveW@ACM.org> (DECnet support and manpage).
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment