deepin如何安装kali工具防止崩溃无法进入系统

最近还是回归了deepin系统,国产系统的确越做越好,当尝试直接添加源安装kali工具的时候,重启后就进不去deepin系统了,后来经过多次重装测试,找到了关键问题

也就是更改了deepin系统的源,参考了许多百度来源资料,这里记录一个完美的解决方法

首先cd进入/etc/apt/的文件夹,创建文件kali

sudo vim /etc/apt/kali
然后在里面写入kali的源与deepin的源

## Generated by deepin-installer
deb [by-hash=force] http://packages.deepin.com/deepin lion main contrib non-free
#deb-src http://packages.deepin.com/deepin lion main contrib non-free

#### kali
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

然后继续按照这个方法,新建一个deepin文件

sudo vim /etc/apt/deepin

写入deepin源内容

## Generated by deepin-installer
deb [by-hash=force] http://packages.deepin.com/deepin lion main contrib non-free
#deb-src http://packages.deepin.com/deepin lion main contrib non-free
写入后保存,然后在/bin/目录下面添加一个kali文件

sudo vim /bin/kali
置入以下代码
#!/bin/bash
hp="--help"
if [ $1 ]
then
if [ $1 = $hp ]
then
echo -e "Just add your soft name after kali\nlike this: kali sqlmap\n"
else
echo "Wait....."
sudo cp /etc/apt/kali /etc/apt/sources.list
sudo apt-get update
sudo apt-get install $1
sudo cp /etc/apt/deepin /etc/apt/sources.list
fi
else
echo -e "--help for help\n"
fi

保存后就可以了,安装工具的方式为
sudo kali xxx
(xxx)就是工具名字,比如
sudo kali metasploit-framework
如图
点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注