~ubuntu-branches/ubuntu/raring/hostname/raring-proposed

« back to all changes in this revision

Viewing changes to man/en_US.88591/hostname.1

  • Committer: Bazaar Package Importer
  • Author(s): Adam Heath
  • Date: 2001-07-07 18:03:56 UTC
  • Revision ID: james.westby@ubuntu.com-20010707180356-rwqa8peu46kjg9ny
Tags: 2.09
Changed Depends to Pre-Depends.  Closes: 102396.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH HOSTNAME 1 "28 Jan 1996" "net-tools" "Linux Programmer's Manual"
 
2
 
 
3
.SH NAME
 
4
hostname \- show or set the system's host name
 
5
.br
 
6
dnsdomainname \- show the system's DNS domain name
 
7
.br
 
8
 
 
9
.SH SYNOPSIS
 
10
.B hostname
 
11
.RB [ \-v ]
 
12
.RB [ \-a ]
 
13
.RB [ \-\-alias ]
 
14
.RB [ \-d ]
 
15
.RB [ \-\-domain ]
 
16
.RB [ \-f ]
 
17
.RB [ \-\-fqdn ]
 
18
.RB [ \-i ]
 
19
.RB [ \-\-ip-address ]
 
20
.RB [ \-\-long ]
 
21
.RB [ \-s ]
 
22
.RB [ \-\-short ]
 
23
.RB [ \-y ]
 
24
.RB [ \-\-yp ]
 
25
.RB [ \-\-nis ]
 
26
 
 
27
.PP
 
28
.B hostname 
 
29
.RB [ \-v ]
 
30
.RB [ \-F\ filename ]
 
31
.RB [ \-\-file\ filename ]
 
32
.RB [ hostname ]
 
33
 
 
34
.PP
 
35
.B hostname
 
36
.RB [ \-v ]
 
37
.RB [ \-h ]
 
38
.RB [ \-\-help ]
 
39
.RB [ \-V ]
 
40
.RB [ \-\-version ]
 
41
 
 
42
.PP
 
43
.B dnsdomainname
 
44
.RB [ \-v ]
 
45
 
 
46
.SH DESCRIPTION
 
47
.B Hostname
 
48
is used to either set or display
 
49
the current host or domain name of the system.  This name is used
 
50
by many of the networking programs to identify the machine. The domain 
 
51
name is also used by NIS/YP.
 
52
 
 
53
.SS "GET NAME"
 
54
When called without any arguments, the program displays the current
 
55
names:
 
56
 
 
57
.LP
 
58
.B hostname
 
59
will print the name of the system as returned by the
 
60
.BR gethostname (2)
 
61
function.
 
62
 
 
63
.LP
 
64
.B dnsdomainname
 
65
will print the domain part of the FQDN (Fully Qualified Domain Name). The
 
66
complete FQDN of the system is returned with
 
67
.BR "hostname \-\-fqdn" .
 
68
 
 
69
.SS "SET NAME"
 
70
When called with one argument or with the 
 
71
.B \-\-file
 
72
option, the commands set the host name or the NIS/YP domain name. 
 
73
 
 
74
.LP
 
75
Note, that only the super-user can change the names. 
 
76
 
 
77
.LP
 
78
It is not possible to set the FQDN or the DNS domain name with the 
 
79
.B dnsdomainname 
 
80
command (see 
 
81
.B "THE FQDN"
 
82
below).
 
83
 
 
84
.LP
 
85
The host name is usually set once at system startup in
 
86
.I /etc/rc.d/rc.inet1
 
87
or
 
88
.I /etc/init.d/boot
 
89
(normally by reading the contents of a file which contains
 
90
the host name, e.g. 
 
91
.IR /etc/hostname ).
 
92
 
 
93
.SS THE FQDN
 
94
You can't change the FQDN (as returned by 
 
95
.BR "hostname \-\-fqdn" ) 
 
96
or the DNS domain name (as returned by
 
97
.BR "dnsdomainname" ) 
 
98
with this command. The FQDN of the system is the name that the
 
99
.BR resolver (3)
 
100
returns for the host name. 
 
101
 
 
102
.LP
 
103
Technically: The FQDN is the name
 
104
.BR gethostbyname (2)
 
105
returns for the host name returned by
 
106
.BR gethostname (2).
 
107
The DNS domain name is the part after the first dot.
 
108
.LP
 
109
Therefore it depends on the configuration (usually in 
 
110
.IR /etc/host.conf )
 
111
how you can change it. Usually (if the hosts file is parsed before DNS or 
 
112
NIS) you can change it in 
 
113
.IR /etc/hosts .
 
114
 
 
115
 
 
116
.SH OPTIONS
 
117
.TP
 
118
.I "\-a, \-\-alias"
 
119
Display the alias name of the host (if used).
 
120
.TP
 
121
.I "\-d, \-\-domain"
 
122
Display the name of the DNS domain.  Don't use the command
 
123
.B domainname
 
124
to get the DNS domain name because it will show the NIS domain name and
 
125
not the DNS domain name. Use
 
126
.B dnsdomainname 
 
127
instead.
 
128
.TP
 
129
.I "\-F, \-\-file filename"
 
130
Read the host name from the specified file. Comments (lines starting with
 
131
a `#') are ignored.
 
132
.TP
 
133
.I "\-f, \-\-fqdn, \-\-long"
 
134
Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a
 
135
short host name and the DNS domain name. Unless you are using bind or NIS
 
136
for host lookups you can change the FQDN and the DNS domain name (which is
 
137
part of the FQDN) in the \fI/etc/hosts\fR file.
 
138
.TP
 
139
.I "\-h, \-\-help"
 
140
Print a usage message and exit.
 
141
.TP
 
142
.I "\-i, \-\-ip-address"
 
143
Display the IP address(es) of the host.
 
144
.TP
 
145
.I "\-s, \-\-short"
 
146
Display the short host name. This is the host name cut at the first dot.
 
147
.TP
 
148
.I "\-V, \-\-version"
 
149
Print version information on standard output and exit successfully.
 
150
.TP
 
151
.I "\-v, \-\-verbose"
 
152
Be verbose and tell what's going on.
 
153
.TP
 
154
.I "\-y, \-\-yp, \-\-nis"
 
155
Display the NIS domain name. If a parameter is given (or 
 
156
.B \-\-file name
 
157
) then root can also set a new NIS domain.
 
158
.SH FILES
 
159
.B /etc/hosts
 
160
.SH AUTHORS
 
161
Peter Tobias, <tobias@et-inf.fho-emden.de>
 
162
.br
 
163
Bernd Eckenfels, <net-tools@lina.inka.de> (NIS and manpage).
 
164
.br