Fix Kali linux apt-get update

08/12/2022

You've downloaded the latest Kali Linux distribution and you encounter the following error:

└─$ sudo apt-get update

Ign:1 http://kali.download/kali kali-rolling InRelease

Ign:1 http://kali.download/kali kali-rolling InRelease

Ign:1 http://kali.download/kali kali-rolling InRelease

Err:1 http://kali.download/kali kali-rolling InRelease

Temporary failure resolving 'kali.download'

Reading package lists... Done

W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease Temporary failure resolving 'kali.download'

W: Some index files failed to download. They have been ignored, or old ones used instead.


In this case - the important error output is highlighted in red text. The Kali linux system is unable to resolve the domain "kali.download". This indicates an issue with your local DNS configuration. If you view your local /etc/resolv.conf file - you may see something similar:

You could first test to see if you can ping the domain referenced "kali.download" and if you get an error - proceed to follow these steps below:


In this case, I'm running my Kali system on a local VMware Fusion application on my MacBook. The network setting for this system in VMware Fusion is set to "Share with my Mac". This means the hosting Macbook is providing NAT services to the VM.

In this scenario - we can resolve this via the following steps:


  1. Use NetworkManager to update the local interfaces IPv4 DNS settings.

  • You will first need to validate the name of your active interface by typing nmcli conn show and obtain the "name" of the connection - in this case "Wired connection 1" as shown in the output below.

2. Type the following command to update the referenced connection's IPv4 DNS with the following command:

  • sudo nmcli con mod "Wired connection 1" ipv4.dns "8.8.8.8 8.8.4.4" (Google DNS servers for example)

  • Verify the setting was taken by NetworkManager by typing nmcli conn show "Wired connection 1" | grep -i ipv4.dns

3. You'll need to restart NetworkManager for the changes to take effect by typing sudo systemctl restart NetworkManager

4. If the settings took correctly - you'll now be able to ping kali.download. If the ping is successful - you can retry your apt-get update command.

Success