Termux
📱

Termux

Termux provides a powerful solution. This open-source terminal emulator creates a lightweight Linux environment directly on Android, allowing users to run command-line utilities, scripting languages (such as python, Bash), and even install additional packages via its built-in package manager.
Unlike traditional terminal apps, Termux  offers a near-complete Linux experience—supporting core utilities, development tools, and SSH access. Developers, sysadmins, and hobbyists can leverage Termux  to:
  • Execute Python, Ruby, or Node.js scripts on the go
  • Compile and run C/C++ programs
  • Manage remote servers via SSH or Git
  • Use text-based editors like Vim or Nano
Since Termux does not require root access, it remains one of the most accessible ways to explore Linux commands and automation on Android. Whether you’re testing code, learning shell scripting, or simply experimenting with Linux tools, Termux bridges the gap between mobile convenience and desktop-like control.

Parameters

 
# activate conda environment """ Since Anaconda can't be directly installed on the Android environment, we should first install miniforge3 """ proot-distro install debian # after installation, log in proot-distro login debian # activate conda environment source /root/miniforge3/bin/activate
In my current project, I needed to deploy local LLM inference on Android smartphones. After testing various approaches, I found that Termux (a Linux terminal emulator for Android) combined with llama-cpp-python provides the most practical solution. Below is the working installation process:
# repair CMake mkdir -p /include/android ln -s /data/data/com.termux/files/usr/include/android/api-level.h /include/android/api-level.h # install the dependencies apt update && apt install -y python git cmake make clang libopenmp openmpi # install llama-cpp-python CMAKE_ARGS="-DLLAMA_NO_ACCELERATE=ON -DLLAMA_OPENMP=OFF -DLLAMA_F16C=OFF -DLLAMA_AVX=OFF -DLLAMA_AVX2=OFF" pip install llama-cpp-python --no-cache-dir
Â