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

Re: Got a machine name problem



On Tue 23 Feb 2021 at 20:05:11 (-0500), Gene Heskett wrote:
> On Tuesday 23 February 2021 14:29:01 Tom Browder wrote:
> > On Tue, Feb 23, 2021 at 11:59 AM Gene Heskett wrote: ...
> >
> > > Nothing I do survives a reboot, so what do I do to actually rename
> > > the machine and make it stick? Hopefully without losiing the
> > > networking
> >
> > Hey, Gene.  I usually have to fiddle around a little, but I've always
> > had success on Debian this way (as root):
> >
> >     # hostname TLM
> >
> >    edit /etc/hostname and set the desired name to TLM if it's not
> > already changed
> >
> > I also edit /etc/hosts and make the first couple of lines look like
> > this:
> >
> >     127.0.0.1 localhost.localdomain.com   localhost
> >     127.0.1.1 TLM.geneslinuxbox.net        TLM
> 
> The first line is std here.
> 
> Why should it have the 2nd one?

If some software wants to know the IP address of TLM before the
network is up, there's no point in handing it 192.168.M.N,
so you use a loopback address to itself.

However, putting TLM on the first line can apparently make
localhost.localdomain into the canonical name of the system,
which is probably not what you want.

BTW I don't know where your .com came from in the first line.

Cheers,
David.


Reply to: