Kali Linux installation tutorial and usage tips

      

1. Create a root account password

      After Kali2020 is installed, the default account used is a common account. You need to create the administrator root account and password in the common account. After logging in to the root account, you can delete the common account.

(1) Create a root account password

1. Enter the sudo command. The sudo command allows an authorized user to run a command as a super user.
kali@kali:~$ sudo

usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [- AknS] [-g group] [-h host] [-p prompt] [-U user] [-u
user] [command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host]
[-p prompt] [-T timeout] [-u user] [VAR=value] [-i|-s]
[]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host]
[-p prompt] [-T timeout] [-u user] file…
2. Normal user switch to root user Then enter the password of the current common user to enter the root user.
kali@kali:~$ sudo –i

We trust that you have learned the daily precautions from the system administrator.
To sum up, nothing more than these three points:
#1) Respect the privacy of others.
#2) Consider (consequences and risks) before entering.
#3) The greater the power, the greater the responsibility.
[sudo] kali password:
3. To create a root user, you need to enter the same password twice in a row, and then switch to the administrator root account.
root@kali:~# sudo passwd root
new password:
re-enter the new password:
passwd: the password has been successfully updated
root@kali:~#

(2) Delete ordinary account

1. Open the directory home, a file in it represents a user
root@kali:~# cd /home/
2. List all users command ls
root@kali:/home# ls
3. Delete ordinary user kali
command format: userdel- r username
root@kali:/home# userdel -r kali
userdel: Kali mail pool (/var/mail/kali) not found
4. Check the account command again
root@kali:/home# ls
root@kali:/home#

(3) Modify system and hardware time

1. View and modify system time
date # View system time
hwclock # View hardware time
root@kali:~# date
Sunday, December 20, 2020 15:29:19 CST
root@kali:~# hwclock
2020-12-20 15 :29:57.405284+08:00
date command to modify the system time:
date [MMDDhhmm[[CC]YY][.ss]]
date 122011042020 #For example 2020-12-20 11:04
2. Modify the time zone
tzselect: execute the tzselect command –>Select Asia–>Select China–>Select east China --> Beijing.
echo “ZONE=Asia/Shanghai” >> /etc/sysconfig
rm -f /etc/localtime # Link to Shanghai time zone file
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #Modify
time zone to Shanghai
sudo timedatectl set-timezone “Asia/Shanghai” #Modify the time zone for Shanghai
#Restart the ntp time synchronization service and wait for the time to update, usually 3~6 seconds
sudo service ntp restart #Write
the system time to the hardware clock to prevent changes after restarting the system Invalidation
sudo hwclock -w
sudo timedatectl status #Display time status

Two, update source

1. Update the source address
vim /etc/apt/sources.list, and enter in the opened file:
#阿里云[update source]
deb https://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb -src https://mirrors.aliyun.com/kali kali-rolling main non-free contrib
#清华大学[update source]
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
#浙江大学[update source]
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
, press the ESC key and enter: wq, save and exit
2. Get the latest software list
apt update
3. According to the obtained software list, install and update the software
apt upgrade
4. Restart the kali system
reboot

Three, kali install googlepinyin input method

Enter the following command under the condition that the debain source, update and upgrade have been updated:
apt-get install fcitx fcitx-googlepinyin #install googlepinyin
and then enter reboot to restart.
Press Ctrl+Space to switch Googlepinyin input method.

Fourth, install OpenOffice software and leafpad

(1) Install OpenOffice

1. Check Kali system, the native system is Linux kali amd64 bit system.
root@kali:~# uname -a
Linux kali 5.9.0-kali4-amd64 #1 SMP Debian 5.9.11-1kali1 (2020-12-01) x86_64 GNU/Linux
2. Download to the "download" folder on the official website and Enter the following command.
root@kali:~# cd download# Enter the download folder
root@kali:~/download# ls # View the file list
Apache_OpenOffice_4.1.8_Linux_x86-64_install-deb_zh-CN.tar.gz
root@kali:~/download# tar zxvf Apache_OpenOffice_4.1.8_Linux_x86-64_install-deb_zh-CN.tar.gz # Unzip to the current folder
root@kali:~/download# cd zh-CN/DEBS # Enter the unzipped DEBS folder
root@kali:~/download /zh-CN/DEBS# sudo dpkg -i *.deb #Install the series.deb package.
root@kali:~/download/zh-CN/DEBS# cd desktop-integration #Enter the
desktop-integration folder
root@kali:~/download/zh-CN/DEBS/desktop-integration# dpkg -i *.deb #Install the
package to create a desktop shortcut
reboot reboot

(2) Install leafpad

  1. Check if there is leafpad
    root@kali:~# apt-cache search leafpad
    leafpad-GTK+ based simple text editor
    lxde-metapackage for LXDE
    mousepad-simple Xfce oriented text editor in the software source
    2. Perform the installation command
    root@kali:~# sudo apt-get install leafpad

Five, install WingIDE

(1) Unzip and install WingIDE

1.root@kali:~# cd download
root@kali:~/download# ls
wingide6_6.0.2-1_amd64.deb zh-CN
root@kali:~/download# dpkg -i wingide6_6.0.2-1_amd64.deb
is not selected The selected software package wingide6
(reading database... There are currently 326,597 files and directories installed in the system.)
Ready to decompress wingide6_6.0.2-1_amd64.deb …
Uncompressing wingide6 (6.0.2-1)…
dpkg: dependency problem makes The configuration of wingide6 cannot continue:
wingide6 depends on libpango1.0-0 (>= 1.18.0); however: the
package libpango1.0-0 is not installed.

(2) Solve the problem of unknown software dependency

root@kali:~/下载# apt-get -f install
is reading the package list... Finished
Analyzing the dependency tree of the software package
Reading status information... Finished
Fixing the dependency... Finished
3. Activate WingIDE with the registration machine

6. Use scapy to prompt No module named all

(1) Let me talk about the conditions for bugs to appear first

The kali2 I use has built-in python3 and python2, and scapy has been installed. There is no problem using scapy under the shell, but when writing python scripts. Import from scapy.all import *, prompt No module named all.
from scapy.all import *
Traceback (most recent call last):
Python Shell, prompt 2, line 1
ImportError: No module named scapy.all

(2) Resolution measures

First find the path where your python library is located, and search through the following script:
import sys
print sys.path
after running as follows:
['','/usr/local/lib/python2.7/dist-packages/Paste-1.7.5.1 -py2.7.egg','/usr/lib/python2.7','/usr/lib/python2.7/plat-x86_64-linux-gnu','/usr/lib/python2.7/lib- tk','/usr/lib/python2.7/lib-old','/usr/lib/python2.7/lib-dynload','/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
Among them,'/usr/local/lib/python2.7/dist-packages' is the path for storing self-compiled python library files.
Kali installs scapy to /usr/ by default lib/python3/dist-packages/ folder, and kali uses python2.7 by default, so importing scapy always prompts No module named all, now we only need to copy the scapy under /usr/lib/python3/dist-packages/ to It can be imported successfully under /usr/local/lib/python2.7/dist-packages.

Seven, configure Kali network

1. The virtual machine is configured with a permanent fixed IP address, which is in the same network segment as the notebook gateway.
vim /etc/network/interfaces
is displayed as follows by default:
#This file describes the network interfaces available on your system
#and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

#The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.8.76
netmask 255.255.255.0
gateway 192.168.8.1

2. Automatically obtain the IP address settings as follows
# Automatically obtain IP address
#The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
2. Configure DNS
vim /etc/resolv.conf
#Generated by NetworkManager
search localdomain
nameserver 114.114. 114.114
nameserver 8.8.8.8
3. Restart the network service
space /etc/init.d/networking restart
or systemctl restart networking

Eight, install rtl8812au wireless network card

1. Install the driver
apt install realtek-rtl88xxau-dkms on the basis of installing kali2020 version and update source
2. Reboot and restart kali to use the network card
3. Use the lsusb command to view, the first line shows that the 8812AU network card is normal.
Bus 001 Device 002: ID 0bda:8812 Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter
oot@localhost:~# airmon-ng (Siamese English), indicating that the installation is successful.
PHY Interface Driver Chipset
phy0 wlan0 rtl88XXau Realtek Semiconductor Corp. RTL8812AU 802.11a/b/g/n/ac 2T2R DB WLAN Adapter 3.

Guess you like

Origin blog.csdn.net/qq_27383609/article/details/112062663