How to use different User Interfaces in Kali Linux

Daniyal Shahzad
4 min readNov 15, 2022

--

Kali Linux is a penetration testing Linux distro and it is quite amazing. In the start Kali was using Gnome as it’s default user interface but in version 2019.4 Kali switched from Gnome to XFCE both are very good user interfaces. The thing I personally like about Gnome is that we can add extensions or make our own custom extensions which makes Gnome more flexible while XFCE is lighter than Gnome and it support a lot of cool things by default for example “kali-undercover” etc. I don’t know about the exact pros and cons of both UI’s because I haven’t digged in their structures and source code but if want me to do so, you can ask me in the comments of this story.

Now let’s start the process, if you are using Kali Linux in dual boot or bare metal you probably have noticed that Kali asks you to choose your user interface during the installation process. But if you are using Kali Linux in virtual machine and downloaded the VM file from Kali official website the there is a 90% chance that you are using XFCE becuase it’s the only one installed. Now if you want to install Gnome or XFCE you have to make sure that you have uncommented the repository for source packages in your “sources.list” file. The steps are:

  1. Open your terminal.
  2. Type: sudo nano /etc/apt/sources.list
  3. And make sure that the line with “deb-src” has no “#” or space in the start.

Your sources.list file should look like this:

Now update and upgrade your Kali, you can just update but you don’t want to have any issues right?, then do an upgrade too. Command is:

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

Once the upgrade is complete, we will now isntall Gnome or XFCE whichever you want.

To install Gnome command willl be:

sudo apt install -y kali-desktop-gnome

For XFCE:

sudo apt install -y kali-desktop-XFCE

During the installation you will be asked to which display manager you want to keep by default gdm3 or lightdm. Select gdm3.

Now reboot your system and when your system is booted, if you were using XFCE you will see the your welcome screen is different. Don’t login yet. You will notice a gear icon on the bottom right corner of the screen click on it and you will see multiple options. These are the user interfaces you have currently installed. Select the user interface which you want to use for the time being and log in and that’s it.

Commands explaination:

I have used multiple commands above I will exaplain them so can understand what we are actually doing:

sudo: it is used to run a command or program with the privileges of another user. By default it uses privileges of root user. So above we are running all the commands as root.

apt: APT is a pakacge manager used by debain based linux distributions. Bascially we are using APT with root permissions to do a certaint task (in our case update, upgrade and install packages)

install: Install is the command for APT, Which is telling APT program what to do, so we are telling apt to install a package (in our case package is kali-desktop-xfce).

update: This is another command for APT which tells APT to update the repository lists. repository is basically a storage location on a local or remote server where different pacages are placed. When we use update command APT checks the current versions of the packages installed on our system and the versions that aer currently there on the server and if the versions are higher so it tells us that we have package updates available.

upgrade: This is another command where we tell the APT to download the available updates and install them on our system.

-y: This is a flag which tells the APT not to ask for user agreement, We already mark the user agreement as YES.

kali-desktop-xfce or kali-desktop-gnome: These are basically the packages names which are available on the repository. So in kali repositories XFCE is named as kali-desktop-xfce and so for the gnome. The package name may vary from repository to repositoy. If I were using a local repository so I could name it anything I wanted, for example best-UI, second_best-UI.

This is it. I will be happy to have your recommendations.

--

--