[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hostname is being reset, killing net on reboot



On Fri, Jan 21, 2022 at 07:27:11PM -0500, gene heskett wrote:
> On Friday, January 21, 2022 6:45:52 PM EST Andrew M.A. Cater wrote:
> > On Fri, Jan 21, 2022 at 06:42:38PM -0500, gene heskett wrote:
> > > So how do I officially set the hostname so its reboot proof?
> > 
> > hostnamectl set hostname [foobar]

The standard Debian way is to put the desired hostname in /etc/hostname.

If I'm reading hostnamectl(1) correctly, the command you wanted should
have a hyphen in it: hostnamectl set-hostname NEWNAME

However, I've never used this command and I'm not sure what it actually
does, or how it interacts with the traditional Debian configuration.

> Thank you Andy. IIRC that can set domainname too?

That depends on what you mean by "domainname".  There is a "domainname"
command in the nis package, which sets the NIS domain name.  But I
somehow suspect this isn't what you mean.  I also suspect you aren't
talking about Kerberos.  Or Samba.

Do you mean a DNS domain name of some kind?  That's my guess.  But even
then, the concept is ambiguous.  What are you actually trying to do?

In order for *other* computers to know your system by a fully qualified
domain name, you would need to alter DNS.  Either the real live global DNS
that everyone uses, if systems are doing DNS lookups on the public
Internet, or else a local area network DNS server that you maintain
interally.  Or else modify the /etc/hosts files on the other computers.

Or perhaps what you mean is something like, "When I type telnet iota,
I want it to act like I had typed telnet iota.gene.local."  In this case,
you're probably aiming for a customized /etc/resolv.conf file.  Which
in turn means you need to read up on how to avoid having your changes
to /etc/resolv.conf wiped out by roaming bands of daemons.  I've covered
this topic so many times that I'm quite tired of it, so just go to
<https://wiki.debian.org/resolv.conf> and read.

Or maybe you mean something else?  Please be specific.


Reply to: