This guide will help you set-up the Kali Linux CLI on any Android device.
Download Termux
First and foremost, you will download Termux.
Termux is an terminal emulator that works directly on Android devices which have not been rooted.
To download the app, you will either use the F-Droid store or the official GitHub repository.
Downloading Termux via the Google Play Store is highly discouraged. This is because the Termux version found on the Google Play Store is depreceted, and thus it's bound to have dependency issues of one form or another.
Set-up Termux
This part is pretty straight forward.
You'll update and upgrade your system using the following command:
$ apt update && apt upgrade -y
You also need to give Termux permission to access your device's storage. To do this, run:
$ termux-setup-storage
Set-up Kali Linux
This is the final part of this guide.
To accomplish your goal, you will be setting-up the Kali Nethunter Rootless Edition.
Kali NetHunter is a custom OS for Android devices. The Rootless Edition is for devices that aren't rooted.
Since NetHunter is an open-source project, you don't need to worry about copyright infringement when utilizing it.
The system requirements will vary but, on the low end, you can set it up as a basic Secure Shell (SSH) server with no desktop, using as little as 128 MB of RAM (512 MB recommended) and 2 GB of disk space. This is what you'll be doing.
To begin with, you'll have to install wget
. It is a computer program that retrieves content from web servers. To install it, we'll use pkg
,the Termux package manager:
$ pkg install wget
After wget
is installed, you'll fetch the NetHunter installation file:
$ wget -O install-nethunter-termux https://offs.ec/2MceZWr
Once the file is downloaded, you'll change it's mode to make it executable so that you can install NetHunter by running it:
$ chmod +x install-nethunter-termux
Run the executable:
$ ./install-nethunter-termux
Using Kali Linux on Android
To start Kali NetHunter command line interface, run: nh
.
It is highly recommended to run sudo apt update && sudo apt full-upgrade -y
first thing after installation to update Kali.
The default root password is: kali
.
To exit the Kali CLI, run: exit
.
To exit the Termux CLI, run: exit
.
Perform regular backups of your rootfs by stopping all nethunter sessions and typing the following in a termux session: tar -cJf kali-arm64.tar.xz kali-arm64 && mv kali-arm64.tar.xz storage/downloads
.
That will put the backup in your Android download folder. Note: on older devices, change “arm64” to “armhf”.