# ~\>domainname shows nothing

**URL:** <https://forums.suse.com/t/domainname-shows-nothing/23638>\
**Category:** SLES Configure-Administer\
**Created:** [February 16, 2013, 8:11pm UTC](https://forums.suse.com/t/domainname-shows-nothing/23638 "2013-02-16T20:11:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ctabor](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@ctabor](https://forums.suse.com/u/ctabor)\
**Post date:** [February 16, 2013, 8:11pm UTC](https://forums.suse.com/t/domainname-shows-nothing/23638/1 "2013-02-16T20:11:18Z")

</div>

Hi,  
I’m trying to install some IBM software that needs a qualified host name like localhost.localdomain. I can set the machine’s host and domain names through the YAST2 network admin application, but the console command 'domainname" returns no domain name at all.

If anyone can tell me what I’m missing and can point me to what I need to know and do, that would be very much appreciated.

TIA

Curt

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [February 16, 2013, 8:20pm UTC](https://forums.suse.com/t/domainname-shows-nothing/23638/2 "2013-02-16T20:20:52Z")

</div>

> [@](#):
>
> On Sat 16 Feb 2013 06:14:01 PM CST, ctabor wrote:
> 
> Hi,  
> I’m trying to install some IBM software that needs a qualified host  
> name like localhost.localdomain. I can set the machine’s host and domain  
> names through the YAST2 network admin application, but the console  
> command 'domainname" returns no domain name at all.
> 
> If anyone can tell me what I’m missing and can point me to what I need  
> to know and do, that would be very much appreciated.
> 
> TIA
> 
> Curt

Hi  
AFAIK, you need to add the switch…

```auto
domainname --help
domainname -f
hostname -f
```

Did you also check the box in YaST to add it to the loopback address?

–  
Cheers Malcolm Â°Â¿Â° (Linux Counter #276890)  
openSUSE 12.2 (x86\_64) Kernel 3.4.28-2.20-desktop  
up 2 days 3:22, 3 users, load average: 0.00, 0.01, 0.05  
CPU IntelÂ® i5 CPU M520@2.40GHz | GPU IntelÂ® Ironlake Mobile

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [February 18, 2013, 4:36pm UTC](https://forums.suse.com/t/domainname-shows-nothing/23638/3 "2013-02-18T16:36:03Z")

</div>

Hi Curt,

man 1 domainname might be helpful:

[QUOTE]NAME  
hostname - show or set the system’s host name  
domainname - show or set the system’s NIS/YP domain name  
dnsdomainname - show the system’s DNS domain name  
nodename - show or set the system’s DECnet node name[/QUOTE]

“domainname” will report the NIS domain - your question sounds like you’re after the DNS domain name, so use “dnsdomainname” instead.

Regards,  
Jens
