On a Debian system, hostname retus the unqualified hostname of the system, whilst domaiame retus the (LAN) domain name. For example:
$ hostname
nas
$ domaiame
lan
I know the hostname is stored in /etc/hostname. That's fine. So I can change it temporarily by calling hostname otheas, or permanently by editing /etc/hostname.
But how do I change the domain name? I can do it temporarily by calling domaiame otherlan, but how to change it permanently?
All my attempts to google the problem have pointed to /etc/hostname, /etc/hosts, /etc/networks and /etc/network/interfaces; but I have checked all of those and found no reference to lan. My googling also tued up the libc.so calls getdomaiame and uname, but again these don't tell me where the information is actually stored on disk.
Other answers on this - and other - forums state that /etc/hostname should contain the fully-qualified host name, and the domain name is pulled from that. This is not true! If I put a fully-qualified host name in /etc/hostname, I end up with a hostname of nas.lan and a domain name of nothing - which causes no end of problems.
- - , .
برچسب:
نویسنده: استخدام کار