]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/README.hostname
Imported from util-linux-2.5 tarball.
[thirdparty/util-linux.git] / misc-utils / README.hostname
1
2 You may ask "Why another version of the hostname command?". The answer is
3 simple. A lot of people misuse the domainname command to get the DNS domain
4 name. Since the domainname command should ONLY be used to set/show the NIS
5 domain name (formerly known as Yellow Pages) there was no easy way to get
6 the FQDN (Fully Qualified Domain Name) or the DNS domainname from within a
7 shell script.
8
9 This hostname command offers you some additional features:
10
11 - show the FQDN (long host name)
12 - show the short host name
13 - show the DNS domain name
14 - read the host name from file
15
16 For further informations simply type "hostname --help" or read the manual
17 page.
18
19 If the program is called as dnsdomainname it will simply show the DNS domain
20 name.
21
22 If you ONLY use the loopback mode you can only use the normal features
23 (set/show the host name) since you probably don't have a FQDN (Fully Qualified
24 Domain Name) in the /etc/hosts file. You can change this by either using
25 the dummy device or by changing the localhost line in /etc/hosts to
26 something like this (it will use localhost as an alias name):
27
28 127.0.0.1 erdos.maths.groucho.edu localhost erdos
29