kalinux 换源

1.系统使用第一步建议先换源,否则将出现很多未知问题

#以下两个2选1,打开要编辑的源
sudo leafpad /etc/apt/sources.list
sudo gedit /etc/apt/sources.list

#权限不够提升 
sudo root

2.把国内源复制换进去(只要选择其中一个即可),保存

#kali官方源
deb http://http.kali.org/kali kali-rolling main non-free contrib

#中科大的源
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
deb http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main contrib non-free
deb http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/kali-security kali-current/updates main contrib non-free

#阿里云源
deb http://mirrors.aliyun.com/kali sana main non-free contrib
deb http://mirrors.aliyun.com/kali-security/ sana/updates main contrib non-free
deb-src http://mirrors.aliyun.com/kali-security/ sana/updates main contrib non-free

#清华大学源
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
   
#浙江大学源
deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free

#重庆大学
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

#搜狐更新服务器 (山东联通千兆接入)
deb http://mirrors.sohu.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ vivid-backports main restricted universe multiverse

#中国科学技术大学更新服务器 (位于合肥,千兆教育网接入,百兆电信/联通线路智能路由)
deb http://debian.ustc.edu.cn/ubuntu/ vivid main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-updates main multiverse restricted universe

#阿里云更新服务器(北京万网/浙江杭州阿里云服务器双线接入)
deb http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ vivid-backports main restricted universe multiverse
deb https://packagecloud.io/amjith/mycli/ubuntu/ trusty main

保存后之后回到命令行下执行命令:

#1.升级,更新
apt-get update 
apt-get upgrade 
apt-get dist-upgrade

#2.删除以下载的包
apt-get clean 

#3.重新启动
reboot

这样应该就没问题了

【相关命令说明】

  • apt-get update:从源(Source)服务器那里下载最新的软件包列;
  • apt-get upgrade:对已经安装的软件包本身进行更新,如果有相依性的问题,而此相依性需要安装其它新的Package或影响到其它Package的相依性时,此Package就不会被升级,会保留下来。
  • apt-get dist-upgrade:对已经安装的软件包本身进行更新,可以聪明的解决相依性的问题,如果有相依性问题,需要安装/移除新的Package,就会试着去安装/移除它。(所以通常这个会被认为是有点风险的升级) 。

换源部分下载失败重新下载:

apt-get update --fix-missing

备注:
apt-get常用命令:

update – 取回更新的软件包列表信息
upgrade – 进行一次升级
install – 安装新的软件包(注:软件包名称是 libc6 而非 libc6.deb)
remove – 卸载软件包
purge – 卸载并清除软件包的配置
autoremove – 卸载所有自动安装且不再使用的软件包
dist-upgrade – 发布版升级,见 apt-get(8)
dselect-upgrade – 根据 dselect 的选择来进行升级
build-dep – 为源码包配置所需的编译依赖关系
clean – 删除所有已下载的包文件
autoclean – 删除已下载的旧包文件
check – 核对以确认系统的依赖关系的完整性
source – 下载源码包文件
download – 下载指定的二进制包到当前目录
changelog – 下载指定软件包,并显示其changelog

 

posted @ 2019-04-16 11:35  晨光曦微  阅读(1477)  评论(0编辑  收藏  举报