FQDN in Solaris 10

The ‘hostname’ command should return an FQDN, that is, fully qualified domain name. For example:

$ hostname
foo.your.domain.com

How do you set it up? Google search doesn’t return much of a useful information. And no, putting stuff into /etc/hosts doesn’t solve the issue. The solution is to edit /etc/nodename and put the FQDN in there and reboot.

echo foo.your.domain.com > /etc/nodename
shutdown -g0 -i6 -y

I have a hunch that reboot is unnecessary, but I haven’t figured out which service needs restarting for this change to take effect.

Author: automatthias

You won't believe what a skeptic I am.

6 thoughts on “FQDN in Solaris 10”

  1. @sarat:

    OK, let’s see how useful it is. My /etc/resolv.conf looks like this:

    $ cat /etc/resolv.conf
    nameserver 8.8.8.8
    $ ▊

    How does this help me?

  2. a correctly configured /etc/resolv.conf should look like this:

    domain example.com
    search example.com subdomain.example.com foo.dom
    nameserver 1.2.3.4
    nameserver 1.2.3.5
    nameserver 1.2.3.6

  3. In Solaris 10 u13, set it immediately with:

    $ domainname

    and make it persist across reboots with:

    $ echo “your domain” >> /etc/defaultdomain

Comments are closed.