set FQDN for hostname

Luis Paulo luis.barbas at gmail.com
Sat Nov 6 16:20:51 UTC 2010


On Sat, Nov 6, 2010 at 01:40, Ric Moore <wayward4now at gmail.com> wrote:
> On Fri, 2010-11-05 at 23:52 +0000, Luis Paulo wrote:
>> hostname will only return the... hostname :)
>> use
>> $ hostname --all-fqdns
>
> hostname -f does it as well. Ric
>

Kind of, see man hostname
"If a machine has multiple network interfaces/addresses or is used in
a mobile environment,  then  it  may  either  have  multiple
FQDNs/domain  names  or  none at all. Therefore avoid using hostname
--fqdn, hostname --domain and dnsdomainname.  hostname --ip-address is
subject to the same limitations so it should be avoided as well."

Not a big deal, but in that case, I'd say
hostname -A does it as well.

Best regards
Luis




More information about the ubuntu-users mailing list