In Kali Linux, changing software sources (also known as changing package repositories) can help increase download speeds, resolve package issues, or use a different version of a software.
The domestic source of Kali is provided at the end of this page, which is tested to be effective and fast;
Steps to change the source of Kali Linux
The following operations require root privileges
Backup the current source list file
Before changing the source, it is recommended to back up the current source list file so that it can be restored when needed;
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
Edit the source list file
Use a text editor to open the source list file/etc/apt/sources.list
;
sudo vim /etc/apt/sources.list
Replace with domestic sources
Replace the contents of the file with the new source address;
Delete the original contents in the file or use #
to comment; then write the domestic source (provided at the end of the article) to the file and save it!
Update Package List
After modifying the source list, run the following command to update the package list and make the changes take effect:
sudo apt-get update
Upgrade System (Optional)
After updating the source list, you can upgrade the packages in the system to ensure that all packages are from the new source.
sudo apt-get upgrade
Kali official source
deb http://http.kali.org/kali kali-rolling main no-free contrib deb-src http://http.kali.org/kali kali-rolling main non-free contrib
Official source speed is unstable, sometimes fast and sometimes slow;
USTC Kali mirror source
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
Alibaba Cloud Kali mirror source
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib deb-src http://mirrors.aliyun.com /kali kali-rolling main non-free contrib
Tsinghua University Kali mirror source
deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free