| |
| You may ask "Why another version of the hostname command?". The answer is |
| simple. A lot of people misuse the domainname command to get the DNS domain |
| name. Since the domainname command should ONLY be used to set/show the NIS |
| domain name (formerly known as Yellow Pages) there was no easy way to get |
| the FQDN (Fully Qualified Domain Name) or the DNS domainname from within a |
| shell script. |
| |
| This hostname command offers you some additional features: |
| |
| - show the FQDN (long host name) |
| - show the short host name |
| - show the DNS domain name |
| - read the host name from file |
| |
| For further informations simply type "hostname --help" or read the manual |
| page. |
| |
| If the program is called as dnsdomainname it will simply show the DNS domain |
| name. |
| |
| If you ONLY use the loopback mode you can only use the normal features |
| (set/show the host name) since you probably don't have a FQDN (Fully Qualified |
| Domain Name) in the /etc/hosts file. You can change this by either using |
| the dummy device or by changing the localhost line in /etc/hosts to |
| something like this (it will use localhost as an alias name): |
| |
| 127.0.0.1 erdos.maths.groucho.edu localhost erdos |
| |