79290919

Date: 2024-12-18 11:36:02
Score: 1
Natty:
Report link

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"

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Catalin Baba