Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This Guide will help you install Kali Linux in Android, that too with a GUI Desktop Environment within Android. It uses Termux to run Kali Linux in Android with XFCE4 Desktop Environment and a Tight VNC Server, which we connect to using a VNC Viewer app in Android.

How to install Kali Linux GUI Desktop in Android using Termux:

This Guide will help you install Kali Linux in Android, that too with a GUI Desktop Environment within Android. It uses Termux to run Kali Linux in Android with XFCE4 Desktop Environment and a Tight VNC Server, which we connect to using a VNC Viewer app in Android.

Just Follow these steps to install Kali Linux with XFCE4 Desktop GUI in Android using Termux:

  • Download and install Termux in Android. (Play Store release is no more updated, so is not recommended.)

  • Open Termux and run the following commands:

    apt update && apt install python python2 openssh -y
    pkg install wget openssl-tool proot -y && hash -r && wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/Installer/Kali/kali.sh && bash kali.sh
    ./start-kali.sh
    
  • After completion of the above steps, you will be in Kali Linux Shell. Run the following commands in the Kali Shell:

    wget https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Scripts/DesktopEnvironment/Apt/Xfce4/de-apt-xfce4.sh && bash de-apt-xfce4.sh
    vncserver
    
  • When it asks, Create and confirm a new password and remember it. You will need it to login in later steps.

  • After setting the password, run the following command:

    vncserver -kill :1
    rm -f ~/.vnc/xstartup
    echo -e '#!/bin/bash\nxrdb \$HOME/.Xresources\nstartxfce4 &' > ~/.vnc/xstartup
    sudo chmod +x ~/.vnc/xstartup
    vncserver
    
  • Let Termux run in background by pressing HOME button in Android.

  • Install VNC Viewer in Android and open it.

  • In VNC Viewer, press the + button in the lower right corner.

    • Under Address type localhost:5901.
    • Under Name type any name that you want to show in the app.
    • Press Create. An Entry by the name you entered will appear.
  • Press the entry you just created in VNC Viewer.

  • Type in the password that you created in a previous step (Turn on the Remember password slider if preffered) and press continue in the upper right corner.

  • You will soon be in your Kali Linux XFCE4 Desktop Environment.

How to stop the session:

Once you have done working(hacking) using Kali-Linux, follow these steps to stop the session:

  • Swipe down from the top of the VNC Viewer app and tap the cross (X) icon.
  • Tap Disconnect when it asks you about being sure to disconect.
  • Now close the VNC Viewer app.
  • Then open Termux that was running in background.
  • To kill the VNC Server in Kali and exit from Kali, run the following commands:
    vncserver -kill:1
    exit
    
  • To exit from Termux, type exit and press Enter.

How to start a new session:

To start a new session if the installation part is already done, follow the following steps:

  • Open Termux and run the command, vncviewer.
  • Let Termux run in background by pressing HOME button in Android.
  • Open VNC Viewer and press the entry that you created during installation.
  • Type in the password created during installation (Turn on the Remember password slider if preferred) and press continue in the upper right corner.
  • You will soon be in your Kali Linux XFCE4 Desktop Environment.
  • Click here to see how to stop the session.
@Darkar25
Copy link

Darkar25 commented Nov 24, 2021

There is no nethunter distribution in proot-distro...

@Amit0617
Copy link

Amit0617 commented Nov 30, 2021

Wishful thinking at its peak.

@umarahmad125
Copy link

umarahmad125 commented Jul 17, 2022

How to install different desktop environment

I want to install KDE Desktop Environment

@anik889
Copy link

anik889 commented Aug 4, 2022

How much storage space does it consume?????

@umarahmad125
Copy link

umarahmad125 commented Aug 5, 2022

I think 3GB

@anik889
Copy link

anik889 commented Aug 5, 2022

All applications are available????

@umarahmad125
Copy link

umarahmad125 commented Aug 6, 2022

No

Download nethunter kali linux gui for full desktop version all applications available in kali nethunter

@UBImagnificent
Copy link

UBImagnificent commented Aug 14, 2022

It did not work for meoo
It is writing User environment variables set when i try to run command beginning with vncserver -kill
Please help

@Kuttym
Copy link

Kuttym commented Aug 15, 2022

Pubg hacking apk

@veraahmad
Copy link

veraahmad commented Aug 23, 2022

احاول ارسال رسالة بالبريد الالكتروني لتطبيق ترمكس لكن يبدو انه معطل عندي مشكلة في ترمكس عدم تثبيت اللينكس كلما لصقت شيفرة اللينكس بالترمكس لا تظهر لي كلمة kali باللون الازرق ارجو المساعدة من موقع جيثهوب

@Khurshiddd
Copy link

Khurshiddd commented Aug 25, 2022

zo'r

@SirDocc
Copy link

SirDocc commented Sep 2, 2022

I'm getting the following error and the server instantly closes. It could be the fault of my own tho?

xrdb: No such file or directory
xrdb: can't open file '$HOME/.Xresources'

@Tishakch0311
Copy link

Tishakch0311 commented Sep 3, 2022

I am being told that the computers domain name could not be resolved in the vnc viewer step, can you please help me or give some advice, really new here.Edit found it

@dextterblog
Copy link

dextterblog commented Sep 8, 2022

How to uninstall

@jdstryn
Copy link

jdstryn commented Oct 4, 2022

There is no nethunter distribution in proot-distro...

you want to install nethunter with proot-distro?
i've script to install it with proot-distro

@Shourab-coding
Copy link

Shourab-coding commented Oct 28, 2022

La
Cd

@Exyou403
Copy link

Exyou403 commented Oct 31, 2022

Saya mendapatkan error, ada yang bisa bantu saya?

proot error: '/usr/bin/env' not found (root = /data/data/com.termux/files/home/kali-fs, cwd = /root, $PATH=(null))
fatal error: see proot --help.
Uploading Screenshot_2022-11-01-00-24-39-504_com.termux.jpg…

@veraahmad
Copy link

veraahmad commented Nov 1, 2022

@mohammedalborih
Copy link

mohammedalborih commented Nov 12, 2022

I installed Kali linux using termux on my android . then I opened it via vncviewer. It works fine.
But I can't use code, and many linux commands inside kali. Why?
And I get "faild to open default web browser" when i open it, why this error?
I need help, please

@Adyextreme01
Copy link

Adyextreme01 commented Nov 30, 2022

Ah it is possible only with an 3d accelerated graphics not weston cause it is slow do as below

In termux after you updated
Pkg install xrdp from x11-repo
Pkg install Mesa, cland, termux-exec, termux services termux-api the apk app is also available on git or f-droid

apt update && apt upgrade --assume-yes && apt-get install wget --assume-yes && wget -O https://raw.githubusercontent.com/Exanoff12/python_in-termux-onescript/main/pythonLATEST.sh pythonLATEST.sh && chmod +x pythonLATEST.sh && bash pythonLATEST.sh

Pkg install dbus

termux usb if you want to forward usb devices

Also take a look at https://github.com/T4P4N/Awesome-Termux installony wat you need

In Linux after installing distro

Sudo apt-get update
Sudo apt-get dist-upgrade

sudo apt update
sudo apt install kali-desktop-kde & kde-full

If you receive a notification that asks you what display manager to use, select sddm, as that is the display manager for KDE.

Installation may take some time, as many packages and their dependencies will have to be downloaded and installed. But once installation has completed, reboot the computer.

Sudo apt-get install Mesa
Sudo apt-get install vulkan
Sudo apt-get install clang
Sudo apt-get install llvm
Cat ~/.vnc/xstartup

Uncomment any other lines that starts a de and add entry for kde dbus-launch startplasma-x11 # or startplasma-wayland

Use that what suit to your configuration depending on what graphics you have in you hardware most have radeon derrivates like adreno or mali tegra is nvidia those compositor have difficulties in wayland x11 should be fine using direct sdl or vnc wich is faster in mobile

Don't mind to ask if you have a big cloud drive y could give you the entire setup 😉 just copy and replace mine is quite big cause it is a full nethunter

@Adyextreme01
Copy link

Adyextreme01 commented Nov 30, 2022

Yeah it is a known issue with Firefox is broken in kali install chromium or even ms edge works great
https://www.kali.org/tools/chromium/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment