hostname issue

Someone offer some insight as how to resolve this?

/bin/hostname --fqdn

results in

hostname: Name or service not known

this is noticed in just deploying an Ubuntu 10.04 new Server config

root@fms:~# hostname



3 Replies

Did you add the IP and FQDN to /etc/hosts?

Yes, thank you. Following is the contents of the /etc/hosts.

I found performing the exact same set of actions on a Debian 6 everything works just fine. I am not sure what the issue is but seems to be specific to the Ubuntu 10.04 config here

cat /etc/hosts localhost.localdomain localhost

/etc/hosts should have

yourip yourfqdn yourhostname

/etc/hostname should have


Once done you can either reboot or run start hostname


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct