Results 1 to 2 of 2
gethostname() returns 'karlmalone.localdomain' I need it to return karlmalone.local.tonytyson.com which is the fqdn. I can fix this by manually doing hostname karlmalone.local.tonytyson.com but it gets reset upon reboot. I believe ...
- 11-29-2007 #1Just Joined!
- Join Date
- Nov 2007
- Posts
- 1
gethostname() returns unexpected result
gethostname() returns 'karlmalone.localdomain' I need it to return karlmalone.local.tonytyson.com which is the fqdn. I can fix this by manually doing hostname karlmalone.local.tonytyson.com but it gets reset upon reboot. I believe I have /etc/hosts set properly. Any idea why this occurs?
/etc/hosts
127.0.0.1 localhost
192.168.1.99 karlmalone.local.tonytyson.com karlmalone
[ttyson@karlmalone ~]$ hostname
karlmalone
[ttyson@karlmalone ~]$ hostname --fqdn
karlmalone.local.tonytyson.com
[ttyson@karlmalone ~]$ hostname -d
local.tonytyson.com
gethostname() returns karlmalone.localdomain
Thanks in advance
- 11-30-2007 #2Just Joined!
- Join Date
- Nov 2007
- Location
- Camp Pendleton
- Posts
- 55
Hi,
You need to setup a search domain in /etc/resolv.conf...


Reply With Quote
