For beginners, solve some problems 【Kali】Teach you how to set Kali source address and update source and install all tool commands


1. Set up, add and modify the source address

1. First enter the following command in the command prompt to open the source list file

sudo vim /etc/apt/sources.list    #使用vim编辑器打开sources.list文件(sources.list为源列表文件)

Note: You must add sudo, otherwise the edited file cannot be saved, and the content of the file will remain the same after exiting, without changing. Here is a mine.

2. Press i to enter edit mode

3. Select at least one of the following source addresses to copy and paste into it

# kali官方源
deb http://http.kali.org/ moto main non-free contrib 
deb-src http://http.kali.org/ moto main non-free contrib
deb http://security.kali.org/ moto/updates main contrib non-free 
deb-src http://security.kali.org/ moto/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
#163 Kali源 
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 
#浙大 
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://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib 
deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
#清华大学
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.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/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

The shortcut key for pasting the file opened by vim is the shift+inster key.
Here I choose the source of the University of Science and Technology of China. It’s okay to choose a few more, but it may take longer to download.

4. After adding and entering, press the ESC key to exit the editing mode, press: enter wq to save and exit

After pressing ESC, the command entered is: wq. Here is the second mine.

:wq

It must be: wq, don't miss the colon:
it will be displayed at the bottom of the terminal.

2. Update source command

apt-get update    #根据/etc/apt/sources.list记载源的文件里面的源更新软件列表
apt-get upgrade   #根据更新的软件列表和已安装软件对比,更新软件

3. Software package operation commands

apt-get install (Package name)    #安装软件包
apt-get remove (Package name)    #卸载已安装的软件包(保留配置文档)
apt-get remove --purge (Package name)    #卸载已安装的软件包(删除配置文档)
apt-get clean    #删除所有包文件
apt-get autoclean    #清除那些已卸载的软件包的.deb文档
    (dpkg -l 列出所有已安装的软件包)

4. Toolkit

Kali-linx-default - the tools we consider essential for penetration testers
Kali-linux-large - for penetration testers facing a wider and unusual set of situations
kali-linux-everything - for those People who want to have the whole kali
apt-get install kali-linux-all -- all tools

Guess you like

Origin blog.csdn.net/weixin_45345143/article/details/129226540