Re: Should /etc/hostname contain the whole FQDN?



On Fri, 31 Aug 2007, Jonathan Wilson wrote:


Can anyone who /knows/ tell me what the proper officially correct ways of
setting the hostname and the FQDN are, please?

Thanks,

JW


--

in /etc/hostname :
myhostname
in /etc/hosts:
10.0.0.120 myhostname.mydomain.com myhostname


set those then run /etc/init.d/hostname.sh as root, this gets ran at boot up, but you can run it and reset the hostname this way.

now when I run hostname -f I get my FQDN, you'll have to restart any services that rely on this as well after changing it.



-+-
8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Techno.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: FQDN Misery Re: To: Postfix, Mutt And No Root Mail? & amavisd-new Install
    ... For an FQDN, find your hostname: ... Now show FQDN: ... The value of variable $myhostname is "ubuntu", ...
    (Ubuntu)
  • Re: does a home user on dialup need a domain name?
    ... what about /etc/hostname, requires a reboot, i think. ... Looking at man 1 hostname, it looks like /etc/hostname is just the short ... The FQDN comes from /etc/hosts. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: localhost in /etc/hosts
    ... the result of the hostname command depends on the /etc/hosts ... file and if your configuration is incorrect, it may not give you a ... The machine should always have a FQDN, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: localhost in /etc/hosts
    ... you should have added the hostname. ... The machine should always have a FQDN, ... I've had stand-alone boxes called localhost, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: does a home user on dialup need a domain name?
    ... Douglas Allan Tuttyis reported to have said: ... Looking at man 1 hostname, it looks like /etc/hostname is just the short ... The FQDN comes from /etc/hosts. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)