CentOS hostname -f returns hostname: Unknown host
I just set up a CentOS 6 (32-bit) 512MB linode and followed the CentOS wiki to change my hostname to somehostname. I did it by doing the following:
$hostname somehostname
Also the new hostname permanent by modifying HOSTNAME in /etc/sysconfig/network (HOMENAME=somehostname).
I rebooted the instance even. I now see my correct hostname in the PS1 prompt and if i do just "hostname". However, I couldn't get the full name somehow.
Anybody had a similar issue and know how to resolve it? Thanks!
3 Replies
@jbenamy:
Did you follow this guide?
http://library.linode.com/networking/co … tos-fedora">http://library.linode.com/networking/configuring-static-ip-interfaces#sph_centos-fedora
Yes I did.
@Nibbler:
It will do that if the hostname is not resolvable. Make sure you actually have a DNS record for the hostname.
I think this may be my problem.
Thanks for the replies!