从Kali Linux 2019.4开始,默认安装过程将创建一个普通用户。同时在安装过程中没有为root用户设置密码,也不知道其密码。所以,系统安装成功后,只能使用新创建的普通用户登录。但是,一些操作需要root权限才可以执行,如ifconfig命令。此时,用户可以使用sudo命令,快速切换普通用户为root用户。
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others. #2) Think before you type. #3) With great power comes great responsibility.
[sudo] password for dc: New password: Retype new password: passwd: password updated successfully ┌──(dc㉿kali01)-[~/Desktop] └─$ su root Password: ┌──(root💀kali01)-[/home/dc/Desktop] └─# su dc ┌──(dc㉿kali01)-[~/Desktop] └─$ sudo su root ┌──(root💀kali01)-[/home/dc/Desktop] └─# su dc ┌──(dc㉿kali01)-[~/Desktop] └─$
2.pip2 pip3 python2 python3安装
最开始的时候kali是不带pip的,至少2020版是这样的 若在终端输入pip,会报错:
zsh: corrupt history file /home/dc/.zsh_history ┌──(dc㉿kali01)-[~/Desktop] └─$ pip install gmpy2 Command 'pip' not found, but can be installed with: sudo apt install python3-pip
┌──(root💀kali01)-[/home/dc/Desktop] └─# curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py 1 ⨯ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 00000000 --:--:-- --:--:-- --:--:-- 00000000 --:--:-- --:--:-- --:--:-- 33 1863k 33 624k 00 480k 00:00:030:00:010:00:02480100 1863k 100 1863k 00 924k 00:00:020:00:02 --:--:-- 924k ┌──(root💀kali01)-[/home/dc/Desktop] └─# python2 get-pip.py DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting pip<21.0 Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB) |████████████████████████████████| 1.5 MB 792 kB/s Collecting wheel Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB) Installing collected packages: pip, wheel Successfully installed pip-20.3.4 wheel-0.36.2
查看pip2版本
:
┌──(root💀kali01)-[/home/dc/Desktop] └─# pip -V pip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) ┌──(root💀kali01)-[/home/dc/Desktop] └─# pip2 --version pip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)