You are not logged in.

#1 2012-12-19 22:12:02

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

short and long hostname confusion.

I am somewhat confused about hostname setting. I use systemd and systemctl apparently only accept short hostname.

[root@********* ~]# hostnamectl set-hostname test.thetests.org
[root@********* ~]# cat /etc/hostname 
testthetestsorg
[root@********* ~]# 

As you see, hostsnamectl remove the dots and considers it as a short hostname. However the hostname command suggests that the contents of /etc/hostname should be the fully qualified hostname (otherwise the -s option of hostname would be pointless). So what's the proper way the set the fully qualified hostname? I am on a laptop with a dynamic IP so I have not a real external hostname. What's the more reliable/proper way to configure the hostname?

Last edited by olive (2012-12-19 22:12:39)

Offline

#2 2012-12-26 20:53:57

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: short and long hostname confusion.

This is expected behaviour, see "man hostenamectl". Not sure why you think /etc/hostname should contain the FQDN, "man 5 hostname" tells it shouldn't.

What's your goal exactly?

Last edited by teekay (2012-12-26 21:15:47)

Offline

Board footer

Powered by FluxBB