TODO List for New Kali

After you installed a new Kali (Virtual) Machine, what’s the next step? Here are some “Must Do” list to make your Kali more handy:

Update to latest version

First, edit the /etc/apt/sources.list.

deb http://http.kali.org/kali kali-rolling main non-free contrib is the official repository for Kali.

And you can configure the sources.list based on your location.
For example, if you’re in China, you can use the following list:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

#中科大
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

#阿里云
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.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.zju.edu.cn/kali kali-rolling main contrib non-free
deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free

It can effectively boost the package download from the internet.

After that, just do the upgrade!

1
2
3
root@kali:~# apt update
root@kali:~#
root@kali:~# apt -y full-upgrade

Note: If you find some “failed connection” after apt update, then just simply remove those lines from your sources.list and do apt update again. It’s not worthy to spend time on figuring out why the connection is failed.

Reboot after the full-upgrade. Then it’s the latest version of Kali on your machine.
You can easily check the version with commands:

1
2
3
root@kali:~# grep VERSION /etc/os-release
root@kali:~# uname -a
root@kali:~# lsb_release -ad

Install Desktop Environment

Starting from Kali 2019.4, the default desktop environment of Kali has been changed to Xfce (Used to be Gnome).

If you upgrade from a earlier version, then you might also want to migrate to Xfce. Relax, it’s easy to do. Just one line command:

1
root@kali:~# apt -y install kali-desktop-xfce. 

When you are asked to select “Default display manager“, select lightdm.

Up till now, the Xfce Desktop Environment has been installed on your machine. Next time when you try to login, you can select it before you submit your login password.

If you would like to set Xfce as the default Desktop environment on your machine, You could run

1
root@kali:~# update-alternatives --config x-session-manager

and select Xfce‘soption.

Add a new “sudo” user

Yes, we all know it’s convenient to do everything as “root”. But it’s obviously not the best practice.
It’s better to create a new user for us to do daily operations…

1
root@kali:~# adduser [yourUserName]
  • You will be asked to set new UNIX password.
  • You will also be asked to provide some information. It’s okay to leave it blank.

Now, a new user has been created. Then we need to add this user to sudo group.

1
root@kali:~# usermod -aG sudo [yourUserName]

Good! Now it’s up to you to switch to this new created user!

Configure your Vim

Refers to this blog.

Configure Input Method (For Non-English Speaking Users)

1
richard@richard-Kali:~# sudo apt install fcitx fcitx-googlepinyin

Then you can open fcitx to configure your Input Method.

1
richard@richard-Kali:~# fcitx-config-gtk3

fcitx Configuration Dialog

Press ‘+’ to add Google Pinyin.
fcitx Add Google Pinyin

Now, it should work!

Configure Bash Aliases

Bash aliases can be used for creating customized command line shortcuts. For example, we can reassign the ls command. Here is how to do that:

Open ~/.bash_aliases and add the following line to this file.

1
alias ls='ls -rthal --color=always

Now, restart the terminal and do ls.

1
2
3
4
5
6
7
8
richard@richard-Kali:~/Desktop$ ls                                                                                                                                         
total 172K
-rwxr-xr-x 1 richard richard 8.3K Dec 14 11:18 google-chrome.desktop
-rwxr----- 1 richard richard 66K Jan 3 13:54 IMG_20200103_135404.png
-rwxr----- 1 richard richard 84K Jan 3 13:54 IMG_20200103_135431.jpg
drwxr-xr-x 2 richard richard 4.0K Jan 3 13:56 .
drwxr-xr-x 21 richard richard 4.0K Jan 14 14:51 ..

The detailed information are listed by default.

References