How to fix sources.list file on Kali Linux
The sources.list file issue often appears after updating Kali Linux. Today's article will show you how to edit sources.list file on Kali Linux.
The sources.list file issue often appears after updating Kali Linux. Today's article will show you how to edit sources.list file on Kali Linux.
Fix the default repository
First, after installing a new Kali Linux completely, sources.list counte only the repository is
123 ## Regular repositories
deb http://http.kali.org/kali potassium main non-free contrib
deb http://security.kali.org/kali-security potassium / updates main contrib non-free
If you try, it can update some applications, but if you try to install a new application, it will not be possible to 90% and a message like this will appear:
E: Unable to locate package
The easiest way is to edit /etc/apt/sources.list
Remove or comment each line with # in front and add the following line in the terminal window:
leafpad /etc/apt/sources.list
After this command line, the screen will appear:
Now, remove the old command line and add a new one.
Repo for Kali Linux versions
- For Kali Linux 1.x users, use the repo below:
(Don't update Kali 1.0, upgrade to Kali 2016 instead).
123456 ## Regular repositories
deb http://http.kali.org/kali potassium main non-free contrib
deb http://security.kali.org/kali-security potassium / updates main contrib non-free
## Source repositories
deb-src http://http.kali.org/kali potassium main non-free contrib
deb-src http://security.kali.org/kali-security potassium / updates main contrib non-free
- For Kali Linux 2.0 - Kali Sana, use the repo below:
(You can still get updates for Kali Sana but not for long. So upgrade to Kali 2016.1)
123456 # Regular repositories
deb http://http.kali.org/kali sana main non-free contrib
deb http://security.kali.org/kali-security sana / updates main contrib non-free
# Source repositories
deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/kali-security sana / updates main contrib non-free
- For Kali Linux 2016 - Kali Rolling, use the repo below:
123deb http://http.kali.org/kali potassium-rolling main contrib non-free
# For gói nguồn truy cập, uncomment theo sau dòng
# deb-src http://http.kali.org/kali potassium-main contrib non-free
- With Kali Linux 2017.1 sources.list use the following repo:
1deb http://repo.kali.org/kali potassium-rolling main non-free contrib
Finally, save and close the file.
Install new, update and upgrade your Kali installation
Use the following command:
1apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
Kali Rolling Repository
In contrast to dev-potassium, potassium-rolling is expected to be of better quality because it is managed by a tool that ensures the installation capability of all packages contained therein. This tool will select packages that are updated from the dev-command and copy them into potassium-rolling only if they have been verified to be installable.
If you still have any questions about updating, read the article How to update Kali Linux and fix errors when updating.
See more:
- How to scan websites for potential security vulnerabilities with Vega on Kali Linux
- How to install Kali Linux on Android using Linux Deploy
- Kali Linux commands from AZ and commonly used commands
You've just finished reading the article "How to fix sources.list file on Kali Linux" edited by the TipsMake team. You can save how-to-fix-sourceslist-file-on-kali-linux.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.
- How to create USB Boot Live Kali Linux
- 4 reasons why white hat hackers love to use Kali Linux
- Kali Linux 2019.1 was officially released
- How to update Kali Linux and fix errors when updating
- Introducing Kali Linux operating system
- Steps to install Kali Linux on your computer are detailed and easy to follow
- Things you need to know about Kali Linux Image
- Kali Linux is available on the Windows Store but is flagged by Windows Defender
- How to install Kali Linux on macOS
- How to Install Kali Linux NetHunter on Android
- How to install Kali Linux reduced version
- Team Kali Linux teaches free online pentest on Twitch
- Learn about Ethical hacking using Kali Linux and Raspberry Pi
- How to install Kali Linux dual boot on macOS