Skip to content

Instantly share code, notes, and snippets.

@HimDek
Last active November 18, 2024 03:40
Show Gist options
  • Save HimDek/49a3cd23e9a931eb8920423a0fb3668a to your computer and use it in GitHub Desktop.
Save HimDek/49a3cd23e9a931eb8920423a0fb3668a to your computer and use it in GitHub Desktop.
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.
@Xaos50
Copy link

Xaos50 commented Jun 5, 2024

Питон стоит старой версии!
Uploading Screenshot_20240605_200302_com.termux.jpg…

@Pri-aRy-OPy
Copy link

Knp pass masukin vncserver-start minta password

@Ramkishorjaa
Copy link

pkg install tsu -y && hash -r

@Xaos50
Copy link

Xaos50 commented Jun 14, 2024

pkg install tsu -y && hash -R Братишка Тцудо я установил в Термаксе, но сам Тцудо запрашивает у меня sudo!(((

@Pri-aRy-OPy
Copy link

Pri-aRy-OPy commented Jun 14, 2024 via email

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Ну шта БРАЗЕРСЫ Кул хакеры???)))

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Я нашёл Скрипт установки Kali Nethunter на Андроид 9!))) Перерыл много сайтов, и нашёл случайно на Яндексе- 100% рабочий Скрипт- рабочий без танцов с бубном!)))

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Есть Сайт ЛинуксКлоуд- там есть скрипт!))) Я по нему- все таки установил Полную версию Кайли Нетхантер на смартфон!) Работает все- звук/графика/интернет!)))

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Вот выложу вам Скрины!))) Оцените)

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Screenshot_20240617_130348_com realvnc viewer android
Screenshot_20240616_213858_com realvnc viewer android
Screenshot_20240616_204958_com realvnc viewer android
Screenshot_20240616_204817_com realvnc viewer android
Screenshot_20240616_161521_com offsec nethunter kex

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Сама система Огонь!!!) Лучше андроида в 1000000 раз!)))

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Работает через Real Vnc вьювер!) Просто в клиенте РВНК вьевер- пишем имя соединения: localhost порт 5901, и имя соединения: Kali))) Всё!)

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

А ещё вот важно! В Термаксе- когда зайдете/войдёт в Нетхантер--обязательно Залогинтесь в самой системе Кайли- логин Kali пароль Kali)))

@Xaos50
Copy link

Xaos50 commented Jun 17, 2024

Если кому нужна Помощь с установкой Нетхантера пишите мне на Gmail почту- enabatov440@gmail.com)))

@xeolon
Copy link

xeolon commented Jun 22, 2024

How to restart the new version after exiting termux:

run the following command: export USER==root && vncserver

Thank you

@xeolon
Copy link

xeolon commented Jun 22, 2024

Anh em nao Vietname vao diem danh :)

@xeolon
Copy link

xeolon commented Jun 22, 2024

Make sure you set an 8-digit password

@Xaos50
Copy link

Xaos50 commented Jun 23, 2024

Убедитесь, что вы установили 8-значный пароль

Бро у меня 6ти значный пароль стоит)))

@xeolon
Copy link

xeolon commented Jun 24, 2024

Если у вас есть 6-значный пароль, можете ли вы запустить vnc?

@Maxrion2
Copy link

Screenshot_20240626-143838
What to do to add the password

@Anisyoosuf
Copy link

Screenshot_20240418-212014_RVNC Viewer How to solve this problem

Screenshot_20240418-212014_RVNC Viewer How to solve this problem

./start-kali.sh
vncviewer

@Maxrion2
Copy link

Maxrion2 commented Jul 5, 2024 via email

@NISHIUMIrenkai
Copy link

Okay

On Fri, Jul 5, 2024, 18:18 Anisyoosuf @.> wrote: @.* commented on this gist. ------------------------------ [image: Screenshot_20240418-212014_RVNC Viewer] https://private-user-images.githubusercontent.com/161618412/323683322-f6599bca-6b01-44c9-a995-db49f61b71d2.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxOTI4NTMsIm5iZiI6MTcyMDE5MjU1MywicGF0aCI6Ii8xNjE2MTg0MTIvMzIzNjgzMzIyLWY2NTk5YmNhLTZiMDEtNDRjOS1hOTk1LWRiNDlmNjFiNzFkMi5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwNVQxNTE1NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yMzJmODdlZGFlZGM2ZmQ1MTkzMzgzZTdkMTViMmVmMDRlNTM4MTE3NzFkNGNiMzY0MDQ3NjE1NDA0MDEyZTIzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.SSKGOzOlzqx3DNpofsgSHXZ2VhCOYM7FVComr9EoQwA How to solve this problem [image: Screenshot_20240418-212014_RVNC Viewer] https://private-user-images.githubusercontent.com/161618412/323683322-f6599bca-6b01-44c9-a995-db49f61b71d2.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxOTI4NTMsIm5iZiI6MTcyMDE5MjU1MywicGF0aCI6Ii8xNjE2MTg0MTIvMzIzNjgzMzIyLWY2NTk5YmNhLTZiMDEtNDRjOS1hOTk1LWRiNDlmNjFiNzFkMi5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwNVQxNTE1NTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yMzJmODdlZGFlZGM2ZmQ1MTkzMzgzZTdkMTViMmVmMDRlNTM4MTE3NzFkNGNiMzY0MDQ3NjE1NDA0MDEyZTIzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.SSKGOzOlzqx3DNpofsgSHXZ2VhCOYM7FVComr9EoQwA How to solve this problem ./start-kali.sh vncviewer — Reply to this email directly, view it on GitHub https://gist.github.com/HimDek/49a3cd23e9a931eb8920423a0fb3668a#gistcomment-5112218 or unsubscribe https://github.com/notifications/unsubscribe-auth/BJCIRSRFACWFYWJWOXXHVK3ZK22LVBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTCMRXHEYTINZTU52HE2LHM5SXFJTDOJSWC5DF . You are receiving this email because you commented on the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

Hey, how did you add the password? I can't see the other guy's img

@Martines700
Copy link

Martines700 commented Jul 6, 2024 via email

@wanhear
Copy link

wanhear commented Jul 6, 2024

IMG_20240707_031621
What is the matter?
vncserver: The USER environment variable is not set.

@namir8499
Copy link

Its showing Me This Error What To Do please help Me Out
Uploading Screenshot_2024-07-13-17-41-08-729_com.realvnc.viewer.android.jpg…

@wanhear
Copy link

wanhear commented Jul 15, 2024

I can't view this photo.

@B8nk1028
Copy link

~ $ ./start-kali.sh
root@localhost:~# export USER==root && vncserver

Warning: localhost:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server localhost:1

New 'X' desktop is localhost:2

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:2.log

root@localhost:~# vncserver-start

Warning: localhost:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server localhost:1
A VNC server is already running as :1
root@localhost:~# vncviewer

What did I do wrong

@Askar86bro
Copy link

Askar86bro commented Oct 14, 2024 via email

@Xaos50
Copy link

Xaos50 commented Nov 11, 2024

Кулхацкера все Собрались сцка!!!😂😂😂🤙

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