View previous topic :: View next topic |
Author |
Message |
niyumard n00b
Joined: 08 Sep 2020 Posts: 11
|
Posted: Tue Sep 08, 2020 10:59 am Post subject: [Solved] Hostname changes to dhcppc2 |
|
|
Hi, I've set my hostname as per handbook's guidance:
Code: |
cat /etc/hostname
computerpc
|
but running hostname returns: dhcppc2
When I first boot my computer, my host name is shown correctly but after a while (for example by logging in or entering a wrong password), it just changes to dhcppc2
What should I do?
Last edited by niyumard on Tue Sep 08, 2020 2:56 pm; edited 2 times in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30985 Location: here
|
Posted: Tue Sep 08, 2020 11:23 am Post subject: |
|
|
Welcome to gentoo forum.
You are sure that /etc/hostname is correct location?
In handbook we talk about /etc/conf.d/hostaname. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
niyumard n00b
Joined: 08 Sep 2020 Posts: 11
|
Posted: Tue Sep 08, 2020 1:33 pm Post subject: |
|
|
Oh right,
I'd set that place actually, and today I saw a strange line added to it:
Code: |
# Set to the hostname of this machine
hostname="computerpc"
is<80>kbge<80>kb<80>kbcomputerpc^[:wq^M
|
I removed the other line and will update this message if this changes anything.
Update: removing the line didn't change anything, hostname still returns dhcppc2 |
|
Back to top |
|
|
Tony0945 Watchman
Joined: 25 Jul 2006 Posts: 5127 Location: Illinois, USA
|
Posted: Tue Sep 08, 2020 2:29 pm Post subject: |
|
|
I'd guess that your dhcp server is setting it. |
|
Back to top |
|
|
niyumard n00b
Joined: 08 Sep 2020 Posts: 11
|
|
Back to top |
|
|
|