]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/hostname.1
Imported from util-linux-2.5 tarball.
[thirdparty/util-linux.git] / misc-utils / hostname.1
1 .TH HOSTNAME 1 "28 July 1994" "Linux" "Linux Programmer's Manual"
2 .SH NAME
3 hostname \- show or set the system's host name
4 .br
5 dnsdomainname \- show the system's domain name
6 .SH SYNOPSIS
7 .B hostname
8 .RB [ \-d ]
9 .RB [ \-\-domain ]
10 .RB [ \-F\ filename ]
11 .RB [ \-\-file\ filename ]
12 .RB [ \-f ]
13 .RB [ \-\-fqdn ]
14 .RB [ \-h ]
15 .RB [ \-\-help ]
16 .RB [ \-\-long ]
17 .RB [ \-s ]
18 .RB [ \-\-short ]
19 .RB [ \-v ]
20 .RB [ \-\-version ]
21 .RB [ name ]
22 .br
23 .B dnsdomainname
24 .SH DESCRIPTION
25 .B Hostname
26 is the program that is used to either set the host name or display
27 the current host or domain name of the system. This name is used
28 by many of the networking programs to identify the machine.
29 .LP
30 When called without any arguments, the program displays the current
31 name as set by the
32 .B hostname
33 command. You can change the output format to display always the short
34 or the long host name (FQDN). When called with arguments, the program will
35 set the value of the host name to the value specified. This usually is
36 done only once, at system startup time, by the
37 .I /etc/rc.d/rc.inet1
38 configuration script.
39 .LP
40 Note, that only the super-user can change the host name.
41 .LP
42 If the program was called as
43 .B dnsdomainname
44 it will show the DNS domain name. You can't change the DNS domain name with
45 .B dnsdomainname
46 (see below).
47 .SH OPTIONS
48 .TP
49 .I "\-d, \-\-domain"
50 Display the name of the DNS domain. Don't use the command
51 .B domainname
52 to get the DNS domain name because it will show the NIS domain name and
53 not the DNS domain name.
54 .TP
55 .I "\-F, \-\-file filename"
56 Read the host name from the specified file. Comments (lines starting with
57 a `#') are ignored.
58 .TP
59 .I "\-f, \-\-fqdn, \-\-long"
60 Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a
61 short host name and the DNS domain name. Unless you are using bind or NIS
62 for host lookups you can change the FQDN and the DNS domain name (which is
63 part of the FQDN) in the \fI/etc/hosts\fR file.
64 .TP
65 .I "\-h, \-\-help"
66 Print a usage message on standard output and exit successfully.
67 .TP
68 .I "\-s, \-\-short"
69 Display the short host name.
70 .TP
71 .I "\-v, \-\-version"
72 Print version information on standard output and exit successfully.
73 .SH FILES
74 .B /etc/hosts
75 .SH AUTHOR
76 Peter Tobias, <tobias@server.et-inf.fho-emden.de>
77