Artix Linux Forum

Artix Linux => System => Topic started by: pcranaway on 23 April 2022, 12:00:01

Title: hostname resetting to "artixlinux"
Post by: pcranaway on 23 April 2022, 12:00:01
Hi there!

Fresh install, and my hostname keeps resetting to 'artixlinux' every time I log in, pretty weird.

/etc/hosts:
Code: [Select]
127.0.0.1	localhost
::1 localhost
127.0.1.1 air

/etc/hostname:
Code: [Select]
air

hostname output:
Code: [Select]
artixlinux

(Using OpenRC)
Title: Re: hostname resetting to "artixlinux"
Post by: VictorBrand on 23 April 2022, 13:32:18
Try to do the following: delete the /etc/hostname file and create the /etc/conf.d/hostname one with the following content:
Code: (/etc/conf.d/hostname) [Select]
hostname=air
(this is an OpenRC-specific feature)
Title: Re: hostname resetting to "artixlinux"
Post by: strajder on 23 April 2022, 13:46:11
This is in the Artix wiki:
https://wiki.artixlinux.org/Main/Installation#Network_configuration
Quote
If you use OpenRC you should add your hostname to /etc/conf.d/hostname too:
Code: [Select]
hostname='myhostname'