Kali Linux Rolling post install tips

1. Check / restore Kali Linux Rolling Repository

Use the complex command to test Kali Repository:

if cat /etc/apt/sources.list | grep -E "deb https://http.kali.org/kali kali-rolling main contrib non-free" || cat /etc/apt/sources.list | grep -E "deb https://http.kali.org/kali kali-rolling main non-free contrib"; then echo -e "\n\n\033[0;32mRepository is ok"; else echo -e "\n\n\033[0;31mRepository is not alright"; fi

If it is necessary, you can restore Kali Linux Repository to original state by the command:

echo -e "deb https://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list

You will find more details here.

2. Install VirtualBox Guest Add-ons for Kali Linux

You need this ONLY if you installed Kali Linux in a virtual machine.

sudo apt update && sudo apt full-upgrade -y
​sudo reboot
sudo apt install -y virtualbox-guest-x11
sudo reboot

3. Mount Windows hard discs in Kali Linux. Fixing the error ‘The disk contains an unclean file system (0, 0). Metadata kept in Windows cache, refused to mount’

You need this step only if you have issues with access to Windows hard discs. This situation can happen when you install Kali Linux as the second OS.

Looking for a drive we are interested in:

fdisk -l

Use the command ntfsfix for your Windows hard disc what you try to mount. For example, my disc is /dev/sdb1, so I type:

sudo ntfsfix /dev/sdb1

4. Daily OS updating

sudo apt update && sudo apt full-upgrade -y

5. Clean your system regularly

For uninstalling unnecessary programs and packages:

sudo apt-get autoremove -y

For cleaning cache:

sudo apt-get clean -y

6. Change Desktop Environment in Kali Linux

If you do not like Gnome 3 in Kali Linux, you can install any Desktop Environment you prefer. I like Cinnamon, so to install Cinnamon in Kali Linux:

sudo apt-get install kali-defaults kali-root-login desktop-base cinnamon
sudo update-alternatives --config x-session-manager

You will find desktop wallpapers in /usr/share/backgrounds/.

You will have issues while using Cinnamon with root. You will not able change background of your desktop or create a shortcut on the desktop. You should login as normal user.

If anyway you boot into default Desktop Environment, you should install lightdm:

sudo apt install lightdm

Select lightdm:

You can select another Desktop Environment for your Kali Linux.

To install Xfce in Kali Linux:

sudo apt-get install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies

To remove Xfce:

sudo apt-get remove xfce4 xfce4-places-plugin xfce4-goodies

To install KDE in Kali Linux:

sudo apt-get install kali-defaults kali-root-login desktop-base kde-plasma-desktop

How to install Standard Debian selected packages and frameworks in Kali Linux:

sudo apt-get install kali-defaults kali-root-login desktop-base kde-standard

How to install KDE Full Install in Kali Linux:

sudo apt-get install kali-defaults kali-root-login desktop-base kde-full

How to remove KDE on Kali Linux:

sudo apt-get remove kde-plasma-desktop kde-plasma-netbook kde-standard

To install LXDE in Kali Linux:

sudo apt-get install lxde-core lxde kali-defaults kali-root-login desktop-base

To remove LXDE:

sudo apt-get remove lxde-core lxde

To install GNOME in Kali Linux:

sudo apt-get install gnome-core kali-defaults kali-root-login desktop-base

To remove GNOME:

sudo apt-get remove gnome-core

To install MATE in Kali Linux:

sudo apt-get install mate-core mate-desktop-environment-extra mate-desktop-environment-extras

To remove MATE:

sudo apt-get remove mate-core

To install e17 в Kali Linux:

sudo apt-get install e17

To remove e17:

sudo apt-get remove e17

Use the command for selection Desktop Environment:

sudo update-alternatives --config x-session-manager

7. Installation Total Commander Counterpart

How to install Double Commander in Kali Linux:

sudo apt-get install doublecmd-gtk

Double Commander is also available for Windows.

8. How to create a normal user in Kali Linux

useradd -m -G sudo -s /bin/bash new_user

Replace new_user with name of your new user.

Set the system password for the new user:

passwd new_user

If you don’t like to type password every time when you use sudo, use the following command:

echo '%sudo ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

9. Solving the error ‘The following signatures were invalid’

If you use the apt command, for example, to update package information, or if you install a new package, you can face with an error:

apt update
Get:1 http://mirrors.dotsrc.org/kali kali-rolling InRelease [30.5 kB]
Err:1 http://mirrors.dotsrc.org/kali kali-rolling InRelease
  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
Reading package lists… Done
Building dependency tree       
Reading state information… Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrors.dotsrc.org/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease&nbsp; The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <devel@kali.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.

To fix it, run the following commands:

wget 'https://archive.kali.org/archive-key.asc'
apt-key add archive-key.asc

Click here for details.

Recommended for you:

One Comment to Kali Linux Rolling post install tips

  1. beuyet says:

    Thanks, i've been looking for something like this since. I wish to know if there is any security setting that can help prevent from malware ?

Leave a Reply

Your email address will not be published.

Please consider supporting this blog

Love the stuff I create? Please consider donating to help things rolling faster! miloserdov.org/?p=1460