hostname: No address associated with hostname
Sebastian Wright
Good day! I am using 20.04.3 Ubuntu server on my Raspberry Pi 4,
I am using my Rp4 as Pi-hole w/ unbound as well as a docker, everything went fine except for 1 which is the the title of my post
I did try the following
removing the resolv.conf
sudo rm /etc/resolv.confand then create a new onesudo nano /etc/resovl.confRESULT: nothing happend
I put this in my
/etc/host10.124.10.20 homelab-ubuntu-server 127.0.0.1 localhostRESULT: still getting the error
I'm running out of option on what to do with it.
Note: I always do a sudo reboot now every time i change my host and hostnames and I still see myself as a beginner in linux
Additional Info:
my netplan is setup like this:
ethernets: eth0: addresses: - 10.124.10.20/24 gateway4: 10.124.10.1 nameservers: addresses: [10.124.10.20] optional: trueThanks
21 Answer
I have time to troubleshoot again and I found the solution and it's all my mistake
I am editing the wrong file all along!! haha damn, it should be /etc/hosts not /etc/host
after editing the /etc/hosts and restarting the system, the hostname: No address associated with hostname is now gone