Sent from my iPad
> On Oct 27, 2023, at 9:05 AM, Greg Wooledge <g...@wooledge.org> wrote:
>
> On Fri, Oct 27, 2023 at 07:59:00AM -0400, Pocket wrote:
>>> On 10/27/23 07:50, Greg Wooledge wrote:
>>> On Fri, Oct 27, 2023 at 07:29:20AM -0400, Pocket wrote:
>>>> /etc/hosts
>>> If you're using short-form hostnames like this:
>>>
>>> unicorn:~$ hostname
>>> unicorn
>>>
>>> then yeah, that's all you need. If you're using long-form hostnames
>>> (with dots in them), then you also need to configure /etc/hostname.
>>>
>>> I use the short-form hostnames, so mine is simply:
>>>
>>> unicorn:~$ cat /etc/hostname
>>> unicorn
>>>
>>> Couldn't be simpler, really.
>>
>> Are you referring to the domain name or FQDN?
>
> Neither. I'm referring to the hostname, as printed by the hostname(1)
> command.
>
> There are two philosophies for how to set your hostname. You can either
> use the short form (no dots), or the long form (dots).
>
> I use the short form. My hostname is simply set to "unicorn", not to
> "unicorn.wooledge.org" or anything like that. That would be the long form.
>
> If you're a long form hostname person, then your hostname should be set
> to the FQDN of the system.
>
> For a setup like Gene's, where the domain name is unofficial and he
> simply hopes that nobody ever registers it, I strongly recommend using
> short form hostnames.
>
> In BOTH cases, the entry in /etc/hosts should contain both the FQDN (real
> or otherwise), and the short form alias. Thus:
>
> unicorn:~$ grep unicorn /etc/hosts
> 127.0.1.1 unicorn.wooledge.org unicorn
>
> This is independent of which way you set the hostname. The IP address
> could be 127.0.1.1, or it could be your LAN address, if you're using
> statically assigned IPs.
>
You have confused me. I started to use Debian about 4 months ago because I no
longer want to build and update my custom built GNU/Linux systems, which I had
been doing for 20 years. Upon moving to Debian I looked up how to set the
host name and was instructed to set the host name as “host” with out any
“domain” part and then set a FQDN in /etc/hosts. Upon further research I found
out that is the proper what to set the host name since UNIX began.
I had been setting the host name to FQDN and the docs I read stated that was
incorrect.
Can you point to the docs that have information about the “long host names” as
I have not been able to find anything on that?
Sorry about sending the reply directly to you but this iPad won’t let fix that!