In this article, we are going to learn about how to fix Kali Linux repository file. How to fix Kali Linux repositories file after installing the Kali Linux. If you are getting the error Command not fount you have to update your repository file in Kali.
Default Network Repository Value
When you install your fresh or clean Kali Linux then your repository file /etc/apt/sources.list looks like this:
sudo nano /etc/apt/sources.list
This is a default repo file and here you have to get all updates and software but some time network issue or miss configuration repo gives you the error you have to update your /etc/apt/sources.list file using the official repository. It is not the same repo files according to the new update it might be changed or not.
Default Off-line Install Values
If you have no internet and you are installing Kali Linux offline mode so you have got this error. In the offline installation, we have no repo link in /etc/apt/sources.list file so we have to update manually following default repo file while we install in offline mode:
Now here we can not get any update and new package so we have to update the repo file in Kali Linux.
Fix Kali Linux sources list
So, first of all, you have to your repo link you can get from the official website as well as copy from the following:
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb-src http://http.kali.org/kali kali-rolling main contrib non-free
Now after updating your repo (/etc/apt/sources.list) file you can update or upgrade your Kali Linux using the following command.
Or you can also add the following if you have to problem with above reposiroty file.
deb https://http.kali.org/kali kali-rolling main contrib non-free
deb-src https://http.kali.org/kali kali-rolling main contrib non-free
Kali Linux Update & Upgrade Command
sudo apt update && sudo apt -y full-upgrade -y
Now your Kali Linux updates will start and it’s depended on your internet speed and how much time it takes.
Video
How to Fix Kali Linux Repositories File | (/etc/apt/sources.list)
Conclusion
In this tutorial, you learned how to create a new file in Linux from the command line using various commands and a text editor.
If the command line is not your thing you can easily create a blank text file using the right-click menu in the File Manager.
If you have questions, feel free to leave a comment below.
Related Posts: