How to Install Alpine Linux in Termux
Alpine Linux is a lightweight Linux distribution built around musl libc and BusyBox. It is designed to be minimal, secure, and resource-efficient. A basic Alpine container can be under 8 MB, and a minimal installation typically requires around 130 MB of storage.
Supported Architectures
- x86
- x86_64
- ARMhf
- AArch64
Package Manager
Alpine Linux uses the apk package manager.
Requirements
- Termux app installed
- Android device
- ~100 MB internet data
- At least 150 MB free storage
Installation Steps
-
Go to your home directory:
cd $HOME -
Update Termux and install required tools:
pkg update && pkg upgrade && pkg install curl -
Download the Alpine installation script:
curl -LO https://raw.githubusercontent.com/Hax4us/TermuxAlpine/master/TermuxAlpine.sh -
Run the installer:
bash TermuxAlpine.sh -
Start Alpine Linux:
startalpine
To exit the Alpine environment, type:
exit
Recommended First-Time Setup
Once inside Alpine Linux:
-
Update package indexes:
apk update -
Install packages using:
apk add package_name
Important:
Do not use apt or apt-get.
Alpine Linux does not support APT and relies entirely on the apk package manager.