mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 11:19:22 +01:00
etc/hosts/hostname: copy Debian behaviour as a good practice
This commit is contained in:
parent
7c3da50491
commit
21b59adfd2
@ -10,6 +10,7 @@ This file is DNS before DNS and legacy remain which is still used.
|
||||
|
||||
- [`blocklist`](#blocklist)
|
||||
- [`dns`](#dns)
|
||||
- [`hostname`](#hostname)
|
||||
- [`hosts.arch`](#hostsarch)
|
||||
- [`hosts.fedora`](#hostsfedora)
|
||||
- [`hosts.debian`](#hostsdebian)
|
||||
@ -32,6 +33,30 @@ and Unbound, so now it's something I can attempt to `/etc/hosts`.
|
||||
|
||||
**_EXCERCISE CAUTION!_**
|
||||
|
||||
## `hostname`
|
||||
|
||||
As can be seen in `hosts.debian`, Debian specifies hostname in format
|
||||
such as:
|
||||
|
||||
```
|
||||
::1 localhost
|
||||
::1 FQDN UQDN
|
||||
|
||||
127.0.0.1 localhost
|
||||
127.0.1.1 FQDN UQDN
|
||||
```
|
||||
|
||||
where FQDN means _Fully Qualified Domain Name_ and UQDN _Unqualified Domain
|
||||
Name_ (although I don't know if anyone else calls it like that) and I find
|
||||
that a good practice. Additionally I have observed my systems querying their
|
||||
own hostname from global DNS which seems unnecessary and not a great behaviour
|
||||
to me, while this file appended to `/etc/hosts` can tell it immediately all
|
||||
applications and make `resolvectl query hostname.localdomain` find it
|
||||
instantly.
|
||||
|
||||
The `0200:0000:0000:0000:0000:0000:0000:0000`? Replace it with your Yggdrasil
|
||||
address from `yggdrasilctl getself`.
|
||||
|
||||
## `hosts.arch`
|
||||
|
||||
For now this is a symlink to `hosts.steamos` as I am pretty sure they haven't
|
||||
|
7
etc/hosts/hostname
Normal file
7
etc/hosts/hostname
Normal file
@ -0,0 +1,7 @@
|
||||
##### BEGIN HOSTNAME #####
|
||||
|
||||
::1 fully.qualified.hostname.example.net friendlyhostname
|
||||
127.0.1.1 fully.qualified.hostname.example.net friendlyhostname
|
||||
#0200:0000:0000:0000:0000:0000:0000:0000 y.friendlyhostname.example.net
|
||||
|
||||
##### END HOSTNAME #####
|
Loading…
Reference in New Issue
Block a user