I'm updating my mail servers' rDNS and I think I have it all figured out except for one thing.
When I installed my OS (Debian Etch), the installer asked me to enter the "domain name".
- Is the "domain name" updated by using the
hostname
command? - If so, which config file(s) are updated when using the
hostname
command? - If not, how do I change my servers' domain name?
My current /etc/hosts:
127.0.0.1 localhost
67.228.178.164 mrspock.example-old.com mrspock
My current /etc/hostname:
mrspock
$ hostname -f
mrspock.example-old.com
I need to update hostname -f
to be mrspock.example-new.com
.
Answering my own question.
It appears (according to this and this) that you only need to update /etc/hosts to change the domain name specified during install on a Debian system:
That should do it. Please correct me if I'm wrong, but I can't find any other info on changing the domain name. Also,
hostname -f
produces "mrspock.example-new.com" after updating /etc/hosts, as expected.No! hostname Command update /etc/hostname
you can change your domainname by: