kali 更新源 sources.list以及apt-get 相關命令說明

1、設置更新源


網上給出的更新源,只有新加坡的更新源是能夠更新到源文件的。其餘國內源能夠做爲補充,不過新加坡的源速度也不是很快。html


更多環境配置內容,能夠參考在線視頻:http://edu.51cto.com/lesson/id-34754.htmlless

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

#中科大kali源

deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib
deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free

#新加坡kali源

deb http://mirror.nus.edu.sg/kali/kali/ kali main non-free contrib
deb-src http://mirror.nus.edu.sg/kali/kali/ kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb http://mirror.nus.edu.sg/kali/kali-security kali/updates main contrib non-free
deb-src http://mirror.nus.edu.sg/kali/kali-security kali/updates main contrib non-free

#debian_wheezy國內源
spa

deb http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
deb-src http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib 
deb http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib 
deb-src http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib 
deb http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib 
deb-src http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib 
deb http://mirrors.163.com/debian wheezy main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy main non-free contrib 
deb http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian-security wheezy/updates main non-free contrib 
deb http://mirrors.163.com/debian-security wheezy/updates main non-free contrib
orm

2、更新

對軟件進行一次總體更新:視頻

apt-get update htm

apt-get upgradeci

apt-get dist-upgrade rem

apt-get cleanget

3、關於apt-get相關命令說明

4、update upgrade dist-upgrade區別與聯繫

update是第一步找出哪些須要升級it

upgrade:系統將現有的Package升級,若是有相依性的問題,而此相依性須要安裝其它新的

Package或影響到其它Package的相依性時,此Package就不會被升級,會保留下來. 

dist-upgrade:能夠聰明的解決相依性的問題,若是有相依性問題,須要安裝/移除新的Package,

就會試着去安裝/移除它. 

(因此一般這個會被認爲是有點風險的升級) 

 

apt-get upgrade 和 apt-get dist-upgrade 本質上是沒有什麼不一樣的。

 

只不過,dist-upgrade 

會識別出當依賴關係改變的情形並做出處理,而upgrade對此情形不處理。


upgrade: 

upgrade is used to install the newest versions of all packages currently installed on the 

system from the sources enumerated in /etc/apt/sources.list. Packages currently 

installed with new versions available are retrieved and upgraded; under no 

circumstances are currently installed packages removed, or packages not already 

installed retrieved and installed. New versions of currently installed packages 

that cannot be upgraded without changing the install status of another package 

will be left at their current version. 

An update must be performed first so that 

apt-get knows that new versions of packages are available. 

dist-upgrade: dist-upgrade in addition to performing 

the function of upgrade, also intelligently handles changing dependencies with 

new versions of packages; apt-get has a "smart" conflict resolution system, and 

it will attempt to upgrade the most important packages at the expense of less

相關文章
相關標籤/搜索