You are not logged in.

#1 2015-08-15 14:38:58

Рат
Member
Registered: 2015-08-15
Posts: 4

[solved] transient hostname gets set to dhcppc1

Hello I have a new Arch linux and am within setting it up. After reboot, my transient hostname
(I actually am not sure what that is) always gets set to dhccp1.

Here are some files:

$head /etc/host*
==> /etc/host.conf <==
#
# /etc/host.conf
#

order hosts,bind
multi on

# End of file

==> /etc/hostname <==
smalla-think

==> /etc/hosts <==
#
# /etc/hosts: static lookup table for host names
#

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

# End of file
$ hostnamectl
Static hostname: smalla-think
Transient hostname: dhcppc1
…

I have seen that /etc/nsswitch.conf has a myhosts entry under hosts. What is that doing? Where can I read up about it. The manpage doesn't mention it.

Last edited by Рат (2015-08-15 21:05:42)

Offline

#2 2015-08-15 14:43:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] transient hostname gets set to dhcppc1

Try

sudo hostnamectl set-hostname --transient <foo>

http://www.freedesktop.org/software/sys … mectl.html

Offline

#3 2015-08-15 18:53:15

Рат
Member
Registered: 2015-08-15
Posts: 4

Re: [solved] transient hostname gets set to dhcppc1

Thanks, I have tried

hostnamectl set-hostname

both with the explicit --transient option and without (to set all three hostnames, as the man page states).

The hostname doesn't get persisted through restarts. After I have restarted the transient hostname is dhcppc1 again.

Offline

#4 2015-08-15 18:56:35

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] transient hostname gets set to dhcppc1

Have a look at the thread from last year, although it may be a different issue: https://bbs.archlinux.org/viewtopic.php … 2#p1417202

Offline

#5 2015-08-15 21:05:19

Рат
Member
Registered: 2015-08-15
Posts: 4

Re: [solved] transient hostname gets set to dhcppc1

Found it on the connmand wiki page. Has a own section there:

https://wiki.archlinux.org/index.php/Co … e_hostname

Sorry that I haven't seen it before.

Offline

Board footer

Powered by FluxBB