The /etc/resolv.conf file does not have a valid DNS or is overwritten after reboot.
Quick fix: Add DNS manually:
bash Copy code echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf echo "nameserver 8.8.4.4" | sudo tee -a /etc/resolv.conf Block further changes:
bash Copy code sudo chattr +i /etc/resolv.conf Restart the network service:
bash Copy code sudo systemctl restart networking Check the connection:
bash Copy code ping google.com sudo apt update Note: If you use NetworkManager, configure DNS directly with:
bash Copy code sudo nmcli con mod "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4" sudo nmcli con up "Wired connection 1"