You are not logged in.

#1 2013-02-04 01:59:04

jiggpig
Member
Registered: 2011-01-07
Posts: 6

[Solved] Set domain name on systemd system

Since the demise of rc.conf I have been unable to find out how to set the system's domain name. I tried "hostnamectl set-hostname hostname.domain" but it just set the hostname to "hostnamedomain". I also tried setting it manually through the hostname utility but it broke GUI applications (could not connect to display error). No luck with google or tge wiki either. Any ideas?

Last edited by jiggpig (2013-02-04 16:16:55)

Offline

#2 2013-02-04 02:18:37

dag
Member
From: US
Registered: 2013-01-20
Posts: 216

Re: [Solved] Set domain name on systemd system

try  /etc/hostname


--------------------------------------
alcoves wonder creates the wonder unto the ages; never lose that.

Offline

#3 2013-02-04 04:17:26

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 3,522
Website

Re: [Solved] Set domain name on systemd system

First of all, see "man archlinux" for how to set the hostname.

Second, is Bash treating the period as a special character? Try "hostnamectl set-hostname hostname\.domain".

Thirdly, my hostname is just set to "archsystem". Are you thinking of what goes in "/etc/hosts"?

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>	<hostname.domain.org>	<hostname>
127.0.0.1	localhost.localdomain	localhost archsystem
::1		localhost.localdomain	localhost

# End of file

Last edited by drcouzelis (2013-02-04 04:18:47)

Offline

#4 2013-02-04 05:29:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [Solved] Set domain name on systemd system

@drcouzelis, I thought that nss-hostname(or whatever it is called) rendered the editing of the hosts file obsolete...

Offline

#5 2013-02-04 16:16:14

jiggpig
Member
Registered: 2011-01-07
Posts: 6

Re: [Solved] Set domain name on systemd system

@dag

It looks like that works. I didn't try that since the systemd documentation says that /etc/hostname should not have dots in it. Thank you!

@drcouzelis

No, escaping the dot did not fix it.

Offline

Board footer

Powered by FluxBB