[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

/bin/hostname on Debian



I am having trouble with my Debian network configuration, and I am
trying to isolate the problem.  The name of my host is "jupiter" and
the name of my domain is "obliqueuniverse.org".

jupiter:~# echo jupiter.obliqueuniverse.org > /etc/hostname

jupiter:~# cat /etc/hosts | sed –n 1p
  127.0.0.1       localhost.localdomain        localhost  jupiter
jupiter:~# cat /etc/hosts | sed –n 4p
  207.237.37.110  jupiter.obliqueuniverse.org  jupiter

I believe that /bin/hostname without options should output the host
name "jupiter", but it doesn't.  Here's what I get when I run /bin/
hostname:

jupiter:~# /bin/hostname -–domain
  obliqueuniverse.org                   # AS EXPECTED

jupiter:~# hostname –-fqdn
  jupiter.obliqueuniverse.org           # AS EXPECTED

jupiter:~# /bin/hostname –-ip-address
  207.237.37.110                        # AS EXPECTED

jupiter:~# /bin/hostname –short
  jupiter                               # AS EXPECTED

jupiter:~# /bin/hostname –nis
  (none)                                # ? ? ?

jupiter:~# /bin/hostname
  jupiter.obliqueuniverse.org           # EXPECTED "jupiter"

jupiter:~# /bin/hostname –F /etc/hostname
  <NO OUTPUT>                           # EXPECTED "jupiter"

 jupiter:~# /bin/hostname –-alias
  jupiter                               # NOW HOSTNAME IS PRINTED!

Can anyone shed light on the last 4 results?

Thanks & Best Regards,

Vwaju
New York City


Reply to: