If you’re a developer or enthusiast who prefers coding on Android, Termux offers a powerful Linux-like environment right on your device. One of the essential tools for version control is Git, and you can easily install it within Termux.
This guide walks you through the steps to install and configure Git in Termux on Android.
✅ What is Termux?
Termux is a terminal emulator and Linux environment app for Android. It allows you to run a full-fledged Linux shell, install packages with pkg
, and even run development tools like Python, Node.js, and Git.
✅ Prerequisites
- An Android device
- Termux installed (preferably from F-Droid to get the latest version)
🛠 Step-by-Step: Install Git in Termux
🔹 Step 1: Open Termux
Launch the Termux app on your Android device.
🔹 Step 2: Update Package Repositories
Run the following command to make sure your package list is up to date:
pkg update && pkg upgrade
🔹 Step 3: Install Git
Now, install Git using the package manager:
pkg install git
You may be prompted to confirm the installation. Type y
and press Enter.
🔹 Step 4: Verify Git Installation
After installation, check that Git is working:
git --version
Expected output:
git version 2.x.x
🛠 Step 5: (Optional) Configure Git
Set up your Git user identity:
git config --global user.name "Your Name"
git config --global user.email "yo********@ex*****.com"
You can check your configuration with:
git config --list
✅ Summary
Task | Command |
---|---|
Update Termux packages | pkg update && pkg upgrade |
Install Git | pkg install git |
Check Git version | git --version |
Configure Git identity | git config --global user.name "..." |
🚀 Final Thoughts
With Git installed in Termux, you can clone repositories, push commits, and collaborate on projects—all from your Android device. This is a great way to work on-the-go or explore development without needing a laptop.