Efectivament, Narcís. man hostname
hostname - show or set the system's host name ---------------------------------> /etc/hostname domainname - show or set the system's NIS/YP domain name ypdomainname - show or set the system's NIS/YP domain name nisdomainname - show or set the system's NIS/YP domain name dnsdomainname - show the system's DNS domain name --------------------------> /etc/hosts o DNS (imagino que les ordres que deies (gethostname, getdomainname) també. On Wed, 25 Mar 2020 at 15:20, Narcis Garcia <debianli...@actiu.net> wrote: > __________ > I'm using this dedicated address because personal addresses aren't > masked enough at this mail public archive. Public archive administrator > should fix this against automated addresses collectors. > El 25/3/20 a les 10:48, Ernest Adrogué ha escrit: > > 2020-03-20, 17:15 (+0100); Narcis Garcia escriu: > >> $ hostname -f > >> hostname: Name or service not known > >> > >> [...] > >> > >> 2. Hi ha algun servei o fitxer del qual depèn aquest error sobre FQDN? > > > > Diuen [1] que probablement et falta afegir el nom del host a /etc/hosts > > > > [1] > https://unix.stackexchange.com/questions/283550/i-got-error-hostname-name-or-service-not-known-when-checking-ip-of-hostname > > > > Efectivament, el problema tenia relació amb el /etc/hosts però d'una > altra manera: > El gethostname o getdomainname que utilitza aquest programa, llegeix el > fitxer /etc/hosts cercant el «hostname» simple per tal d'obtenir-ne el > FQDN. > Aleshores a les instal·lacions concretes on m'havia fallat, el nom que > hi havia a /etc/hostname no es trobava a /etc/hosts > Exemple: > $ cat /etc/hostname > assaig01-joguines > $ cat /etc/hosts > 127.0.1.1 assaig01.example.net assaig01 > (...) > > -- -- Salutacions...Josep --