problem with hostname

Hello:
I’ve set my hostname as: ABC and domainname: EDF by YAST
I found that when I use command ‘hostname’ in terminal, it said:

ABC

But I expect it should be ABC.EDF which also display the domain name…

Does anybody how to do this?

THX

I would expect it to say ABC not ABC.EDF. If you want the hostname command to show the domain as well use

$ hostname -f

For more info see

$ hostname --help $ man hostname

Hi
Use hostname -f (hostname --help :wink: )


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.19-default
up 1 day 22:37, 3 users, load average: 0.00, 0.01, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Thank you very much for your kind reply.
but my academic software was licensed to a machine named “ABC.DEF” which showned in SLES 10. When I update the system into 11, my academic software claimed my machine name is “ABC” not “ABC.DEF” and the license server cannot be started…

THX

[QUOTE=malcolmlewis;2416]Hi
Use hostname -f (hostname --help :wink: )


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.19-default
up 1 day 22:37, 3 users, load average: 0.00, 0.01, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU[/QUOTE]

[QUOTE=mikewillis;2415]I would expect it to say ABC not ABC.EDF. If you want the hostname command to show the domain as well use

$ hostname -f

For more info see

$ hostname --help $ man hostname[/QUOTE]

in fact, it doesn’t work with command: hostname -f

it said in terminal:

hostname: Unknown host

Hi
So what about the other hostname options any output? Can you check it’s
set;

fgrep -r "ABC" /etc/*

Where ABC is your hostname, also swap for your domain name.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.19-default
up 2:10, 3 users, load average: 0.06, 0.05, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 16/02/2012 05:54, albumns wrote:
[color=blue]

in fact, it doesn’t work with command: hostname -f

it said in terminal:

hostname: Unknown host[/color]

I can confirm on SLES11 SP1 that hostname -f a) works, and b) works
correctly provided /etc/hosts has the correct entry in the form

IP-Address Full-Qualified-Hostname Short-Hostname

With a default install (plus OES11) the entry for my host was

IP-Address Short-Hostname Short-Hostname

so whilst hostname correctly returned Short-Hostname, hostname -f also
returned Short-Hostname whilst hostname -d returned nothing. Editing the
/etc/hosts entry to append domain to first Short-HostName value “fixed”
the output of both hostname -f and hostname -d.

HTH.

Simon
Novell/SUSE/NetIQ Knowledge Partner


Do you work with Novell technologies at a university, college or school?
If so, your campus could benefit from joining the Novell Technology
Transfer Partner (TTP) program. See TTP Organization | Micro Focus for more details.