A simple Bash script to install Kali Linux (rolling) with an XFCE4 desktop on Termux using proot-distro. It survives the systemd-under-proot postinst failures that break naive installs.
Run this in Termux (no root required):
curl -fsSL is.gd/alienkrishn_kalilinux | bashOr clone this repo and run the script directly:
git clone https://github.com/Anon4You/kalilinux
cd kalilinux && bash install_kali.shOn the Termux host (pkg):
- Installs
proot-distro,x11-repo,termux-x11-nightly,dbus, andpulseaudio
Inside the container:
- Installs the
kali-rollingrootfs viaproot-distro - Creates user
kaliwith passwordkaliand full sudo access - Installs XFCE4 desktop (
kali-desktop-xfce), Xwayland, and PulseAudio - Patches systemd postinst failures (shims
systemctl,udevadm, etc.) - Wires X11/audio env and creates a
kalilinuxlauncher
- Install the Termux:X11 app from https://github.com/termux/termux-x11/releases
- Start the app, then run:
kalilinux
- Inside Kali, start the desktop:
startxfce4
The launcher starts termux-x11 + PulseAudio and logs you in as kali (password: kali). DISPLAY=:1 is set automatically.
| Env variable | Default | Description |
|---|---|---|
DISTRO |
kali-rolling |
proot-distro name to install |
KALI_USER |
kali |
Desktop user to create |
KALI_PASS |
kali |
Password for that user |
FRESH |
0 |
Set to 1 to wipe + recreate the distro first |
DESKTOP_PKGS |
dbus-x11 xwayland xfce4-terminal kali-desktop-xfce pulseaudio |
Desktop packages to install |
Example:
FRESH=1 KALI_PASS=changeme bash install_kali.shproot-distro remove kali-rolling # or: proot-distro reset kali-rolling
rm $PREFIX/bin/kalilinux