Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

[Solved] Hostname changes to dhcppc2

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
niyumard
n00b
n00b
Posts: 11
Joined: Tue Sep 08, 2020 10:49 am

[Solved] Hostname changes to dhcppc2

  • Quote

Post by niyumard » Tue Sep 08, 2020 10:59 am

Hi, I've set my hostname as per handbook's guidance:

Code: Select all

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.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Tue Sep 08, 2020 11:23 am

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.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
niyumard
n00b
n00b
Posts: 11
Joined: Tue Sep 08, 2020 10:49 am

  • Quote

Post by niyumard » Tue Sep 08, 2020 1:33 pm

fedeliallalinea wrote:Welcome to gentoo forum.

You are sure that /etc/hostname is correct location?
In handbook we talk about /etc/conf.d/hostaname.
Oh right,
I'd set that place actually, and today I saw a strange line added to it:

Code: Select all

# 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
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Tue Sep 08, 2020 2:29 pm

I'd guess that your dhcp server is setting it.
Top
niyumard
n00b
n00b
Posts: 11
Joined: Tue Sep 08, 2020 10:49 am

  • Quote

Post by niyumard » Tue Sep 08, 2020 2:55 pm

Tony0945 wrote:I'd guess that your dhcp server is setting it.
Yep, this just reminded me that I'm using connman and ArchWiki has warned about it changing the host name.
Fixed it by the way suggested in ArchWiki's article:

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

Thank you!
Top
Post Reply

5 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic