"hostname: Name or service not known" in opensuse 12.1

How can i fix this ?

i have hostname and its “linux-133s”

Hi
YaST->Network Devices->Network Settings->Hostname/DNS tab :wink:

My idea is that the OP’s system does have a hostname and that he does not want to set one (which you can do wuth YaST > …), but that he tries to use de hostname program and that he gets the error message he put into the title.

But I admit that the question is put very cryptic adn that less then the minimal bit of information is given.

Dear Haber_nir,

When my idea about your problem is correct, I would have posted:

henk@boven:~> hostname
boven
henk@boven:~>

which shows which command I am using, as normal user, from which working directory and what I get back on doing this. Please report things in a way that we do understand as good and as litteraly and precise as possible what you do and see.

Same problem with 12.3.
Have change initial hostname but no change.

LINUX-TEST-XYZ:~ # hostname
LINUX-TEST-XYZ
LINUX-TEST-XYZ:~ # hostname -s
hostname: Name or service not known
LINUX-TEST-XYZ:~ # 

Please read the post N°1
hostname is fixed : “linux-133s”

Hanging your problem at the end of a very old post will not draw the attention of many people. Almost nobody will be subscribed to such an old post. And you will not show in the list of new problems.

I had same issue with OpenSuSE 13.1. The computer name was not resolved by the local DNS server. For some reason DHCP was not updating DNS and hence DNS did not know about this host. I went to the DNS server and manually entered the hostname and ip address for this computer. The hostname command worked fine after that.