Install Kali (GUI + Terminal) on your Android device.

Muhammad Huzaifa
6 min readMar 31, 2023

--

Installing one of the best versatile digital forensics and penetration testing operating system on an android device was attractive to me. Yes, I am talking about installing kali Linux on your android device for easy and rapid access and execution of your program files that are not able to run on usual android systems. Not only this but using all the amazing pre-installed applications that could be found only on Linux distributions is easy through this android Linux distribution.

Note:

Now, keep it in mind that like other installation manuals for kali Linux documentations, this procedure does not require flashing or rooting your android device which puts your device at an unnecessary risk.

Before moving onto the installation phase let us skim through the requirements of the process:

Requirements

· At least 3Gb of available space on your android device

· Installation of F-Droid.

· Installation of Termux App

· Installation of Nethunter store

Installing F-Droid & Termux on android

Install the F-Droid app from the following link:

F-Droid | F-Droid — Free and Open Source Android App Repository

· Click “Download f-Droid.”

· Install the apk downloaded.

· Open the app and give necessary permissions to use the application.

· Move to the search tab and search for Termux.

Note:

F-Droid is the application responsible for the installation of Termux application, However, Termux will be responsible for the installation of Terminal based Kali Linux on android using the Nethunter utility.

Install the package highlighted in the above screenshot from the F-Droid application.

Do the same for the Termux application as you did for the F-Droid. Install the application and provide it with necessary permissions on your android device.

Install Nethunter Store and Nethunter Kex

Nethunter store is used to install all the Nethunter framework supported applications. This app will be used to install the Nethunter kex application which we will use later in running the GUI for Kali Linux.

Install the Nethunter store using the following link:

NetHunter KeX | Kali NetHunter App Store — Android App Repository for Penetraton Testing and Forensics

Download and install the apk same as you did with the previous two. Now open the application and search for the “Nethunter kex” application and download it on your device.

Download and install this app as well. Now, we are done with the requirements phase. Without any delay, let us get to the installation of kali.

Kali Linux Installation

Open Termux app, you will see an interface like this:

· Update and upgrade the package using the following command:

· Pkg update && pkg upgrade -y

Now use the following command:

Termux-setup-storage

· Install wget utility using the following command

· Pkg install wget fish

· Now that you have installed the wget utility, use this to install the installer script for the installation and running of kali Linux’s terminal.

“wget https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-project/raw/master/nethunter-rootless/install-nethunter-termux”

Now if you would check the directory in Termux using “ls” command you will see the “install-nethunter-Termux” file in it. Change the permissions of the file using the following command:

· chmod +x install-nethunter-termux

After changing the permissions of installer script run it as:

./install-nethunter-termux

It will ask for you the image you want to install on your device:

I wanted to install the full arm64 image on my device, you can go with the choice of your own, however, the number of modules installed in each image will obviously vary. After selecting the image your installation will begin.

The installation process will take some time do keep back and let the application do its work. After installation you will see something like this:

Now you just need to run the

nethunter

command to run Kali’s terminal. then you can use any command executable on kali as I used

uname -a

to check the version of kali Linux.

That was all for the basic terminal version installation of kali Linux on android using Termux.

Running Kali’s GUI on android Device

Running the GUI for kali Linux is also an easy challenge. You would be wondering why we installed that Nethunter kex manager at the start of this blog in the requirements section. Well worry not!

To run the GUI version on your android device first use

kex

command on Linux terminal in the Termux application.

It will ask you to type a password for the connection and verify it. After that, kex will show you the active display for the kali Linux to which you can connect and run the graphical user interface.

Now run the following command to listen for any active connection trying to connect to this display:

kex start

Now open the Nethunter Kex Manager, you will get a window like this:

Type the password you set after the kex command in kali’s terminal and hit ‘connect.’ Viola! Kali’s GUI interface popped up.

The amazing thing about this is you can use all the GUI application any normal Linux distribution would run on this mini kali Linux’s version. If it is not pre-installed, you just need to run the

sudo apt-get install _______

command where the password for root is “kali” as usual.

Note:

Please keep this in mind the android version may affect the installation of kali Linux on your device, but not to worry, android version 10 and below are perfectly able to run the whole Linux distribution without any issue, however android 12 may create some issues in the name of the security of your device.

However, if you get in some issue during the installation, I am always available to help. Feel free to reach me at my email or LinkedIn or in the comment section. Happy Coding!

--

--

Muhammad Huzaifa
Muhammad Huzaifa

Responses (1)