Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Android

How to install and use Git, Python, and Node.js in Termux

By Freedom251 Team · · 10 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install a supported Termux build, update its rolling-release packages, and add all three tools with one command:

pkg update && pkg upgrade
pkg install git python nodejs

Confirm that each executable is available:

git --version
python --version
node --version

This guide explains the Android-specific details that matter after installation: where projects should live, how to reach shared storage safely, how to run Git, Python, and JavaScript files, and what to do when repositories or package mirrors fail.

As an Amazon Associate I earn from qualifying purchases.

What you need before installing

Termux provides a Linux-like shell and an apt-based package system inside Android. Its command reference describes Termux as using apt(8) as package manager, just like Debian; the pkg command is a convenience wrapper for common package tasks. Read the Termux tools command reference and package-management guidance for the current behavior.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a supported Termux distribution

Install Termux from F-Droid or a current GitHub release. The package-management guidance says Google Play builds are deprecated and unsupported. If an old installation reports repository or package errors, replacing it with a supported build is often the first corrective step.

#1 Best Overall
OMOTON Bluetooth Tablet Keyboard Rechargeable with Backlit, Oversize Keycap | Ultra-Slim Wireless Keyboard for Samsung Tablet, iPad, Smartphone, Android/iOS/Windows, Foldable Stand, Travel Office, Black
  • Full 3-System Compatibility & Wide Device Support: Perfectly compatible with Android, iOS and Windows three major systems. Works seamlessly with Samsung tablets, iPads, iPhones, laptops, smartphone, android, iOS, windows etc
  • How to Switch Systems: Switching to the corresponding system will improve compatibility and higher work efficiency (“FN + A” is for iOs , “FN + S” is for Windows, “FN + D” is for Android )
  • Enhanced Oversized Keycaps:27% bigger than standard keycaps. The spacious surface minimizes accidental presses and ensures comfortable typing for long hours
  • 5 Adjustable Angles & Foldable Stand for tablet or phone, It effectively eases hand and eye fatigue during long hours of use, helping you stay focused and work more efficiently
  • Long Battery Life & Smart Power Saving:Built‑in rechargeable lithium battery, Type‑C fast charging (full charge in 2–3 hours, last up to 200 hours with the backlight off, and 3-5 hours with the backlight on). Auto sleep mode after inactivity to save power, no frequent charging needed
  • Do not mix the Termux app or add-ons installed from different distribution sources. Android treats differently signed builds as separate applications, and mismatched signatures can prevent add-ons from working together.
  • Allow Android to complete the installation, then open Termux and wait for the shell prompt before entering commands.
  • Have a network connection available. Package metadata and archives must be downloaded before the tools can be installed.

Understand the rolling-release model

Termux packages are updated continuously rather than frozen around a single tutorial version. A command shown in an older article may install a newer or older build than the one it names. Always use the version printed on your own device when checking compatibility.

Update Termux and install the three packages

Refresh package metadata and upgrade existing packages

  1. Open Termux.
  2. Run the update and upgrade sequence:
pkg update && pkg upgrade

pkg update downloads current package indexes. If that succeeds, pkg upgrade brings already installed packages to the versions available from the configured repository. The && operator starts the upgrade only when the metadata update exits successfully.

During an upgrade, read any confirmation prompt and allow the process to finish. Interrupting a package transaction can leave a partially configured package; rerun the same command when the shell prompt returns if the operation was interrupted.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Git, Python, and Node.js

Install the requested package names together:

pkg install git python nodejs

Termux uses nodejs for the package name, while the executable you run is node. The package manager resolves dependencies and places command-line programs in Termux’s private prefix, so no Android system-wide installation is required.

Check that each command works

Run all three checks separately:

git --version
python --version
node --version

Each command should print a version and return to the prompt without an error. The exact numbers depend on the repository state and the date of your upgrade. The Termux Node.js build setup currently contains a 24.18.0 value, but that is a build-script setting, not a promise that every device will install that version; check the local result instead. See the Termux Node.js build setup for the value used by the build scripts.

Purpose Command What a successful result means
Git client git --version A Git executable is on the Termux PATH.
Python interpreter python --version The Termux Python interpreter starts and reports its release.
Node.js runtime node --version The Node.js runtime starts and reports its release.

Choose the right place for projects

Keep active projects in Termux home

Termux’s private home directory is represented by ~. A practical layout is:

mkdir -p ~/projects
a
cd ~/projects

The first command creates a projects directory; the second changes into it. Keep Git working trees and folders that contain virtual environments, dependency caches, build outputs, or configuration files below this private home directory. Git operations can fail when a repository is placed directly in Android shared storage such as /sdcard or the Downloads folder. A Termux-specific setup guide documents failures involving cloning, staging, and committing in that location; its instructions are available in the code-server Termux documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Enable shared-storage shortcuts only when needed

Termux does not receive access to Android shared storage automatically. To expose folders such as Downloads, run:

Rank #2
Arteck Compact Wireless Bluetooth Keyboard for iPad Tablet iPhone PC Black
  • Cable-Free: Bluetooth Connection with your mobile devices such as tablets and mobile phones. Bring you more convenience when you need to type. Operating distance up to 10 meters. This keyboard is bluetooth enabled and it doesn't come with a USB dongle. It also supports Bluetooth-enabled PCs or Laptops. Arteck Ultra-Slim Bluetooth Keyboard Compatible with iPad 10.2-inch / iPad Air / iPad 9.7-inch / iPad Pro / iPad Mini, iPhone and other Bluetooth Enabled Devices Including iOS, Android, Windows, Black
  • Broad Compatibility: Use with all four major operating systems supporting Bluetooth (iOS, Android, Mac OS and Windows), including iPad 10.2-inch / Air / iPad Pro / iPad 9.7-inch / iPad Mini / iPhone / Android Tablets like Samsung Galaxy Tab, Google Nexus / Windows, etc.
  • Convenient Layout: QWERTY layout with hot keys customized for all iPads, including volume, music control, brightness, etc.
  • Long Battery Life: Energy-saving design and automatic sleep mode allow up to 4 months between battery changes. (based on 2 hours' non-stop use per day) (2 X AAA batteries included)
  • Package contents: Arteck HB098 Bluetooth Keyboard, 2 X AAA batteries, welcome guide, our 24-month warranty and friendly customer service.
termux-setup-storage
  1. Enter the command in Termux.
  2. Accept the Android permission dialog.
  3. Inspect the shortcuts that Termux creates:
ls ~/storage
ls ~/storage/shared
ls ~/storage/downloads

Typical links include ~/storage/shared for the shared-storage root and ~/storage/downloads for Downloads. These are convenient for copying a finished script, archive, or document between Termux and Android apps.

Android still applies external-storage restrictions. Termux cannot write to shared external storage with the same unrestricted behavior as a file manager, so treat shared storage as an exchange area rather than the location of an active repository. The Termux Wiki FAQ explains the storage and permission limitations.

Use Git in Termux

Create a local repository

Start a project under Termux home and initialize Git:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mkdir -p ~/projects/example
cd ~/projects/example
git init

git init creates a .git directory that stores the repository’s history and configuration. Create or copy files into the directory, then inspect their state:

git status

When Git lists an untracked file, stage it and create the first commit:

git add README.md
git commit -m "Initial commit"

Replace README.md with the actual file you want to stage. If Git asks for an author identity, set it for all repositories or only the current one:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Those values are metadata written into future commits; they do not create an account or authenticate a remote server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Clone an existing repository

Change to a project directory in Termux home and run git clone with the repository address supplied by its host:

Rank #3
Sale
Arteck HB192 Universal Bluetooth Keyboard Multi-Device Stainless Steel Full Size Wireless Keyboard for Windows iOS Android Computer Desktop Laptop Surface Tablet Smartphone Rechargeable Battery
  • 3 Devices Switch with A Single Clicking: This keyboard is able to connect to 3 devices at the same time. You can switch between 3 devices with a single key clicking.
  • Ergonomic design: Stainless steel material gives heavy duty feeling, low-profile keys, full size keys, arrow keys, number pad, shortcuts offer quiet and comfortable typing.
  • Broad Compatibility: Use with all four major operating systems supporting Bluetooth (iOS, Android, Mac OS and Windows), including Computer, Desktop, PC, Laptop / iPad Pro, iPad Air, iPad, iPad Min, iPhone, Smartphone / Android Tablets like Samsung Galaxy, Surface etc.
  • 6-Month Battery Life: Rechargeable lithium battery with an industry-high capacity lasts for 6 months with single charge (based on 2 hours non-stop use per day).
  • Package contents: Arteck Stainless Bluetooth Keyboard, USB charging cable, welcome guide, our 24-month warranty and friendly customer service.
cd ~/projects
git clone <repository-url>

After cloning, enter the new directory and inspect its branch and files:

cd repository-name
git status
git branch --show-current

Use the URL and directory name appropriate to the project. Keep the clone below ~/projects; moving it later from shared storage can also expose file-permission or metadata differences.

Day-to-day Git commands

Task Command
See changed and untracked files git status
Review unstaged differences git diff
Stage one file git add path/to/file
Stage all changes in the current tree git add .
Record staged changes git commit -m "Describe the change"
Download and integrate remote changes git pull

Run git status before and after a commit. It is the quickest way to see whether a file is untracked, modified, staged, or clean.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run Python programs

Create and execute a script

Work in a project directory under Termux home:

cd ~/projects/example
cat > hello.py <<'PY'
print("Hello from Python in Termux")
PY
python hello.py

The shell creates hello.py with one print statement, then the python command executes it. You can also edit the file with a terminal editor or create it in an Android editor and copy it into the project directory.

Check interpreter behavior and version

Use the version command whenever a package or project specifies a Python requirement:

python --version
python -c 'import sys; print(sys.executable)'
python -c 'print(2 + 2)'

The first command reports the installed release, the second prints the interpreter path selected by the shell, and the third confirms that Python can execute an inline expression. Termux’s package guidance includes Python as an available prerequisite for its setup examples; the installed version remains governed by the current repository.

Install Python dependencies carefully

For a project that provides a dependency file, create an isolated virtual environment instead of placing every package in the global interpreter:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd ~/projects/example
python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

The leading dot activates the environment in the current shell. While it is active, python and pip refer to the environment’s executables. Leave it with:

Rank #4
Logitech K480 Wireless Multi-Device Keyboard for Windows, macOS, iPadOS, Android or Chrome OS, Bluetooth, Compact, Compatible with PC, Mac, Laptop, Smartphone, Tablet - Black
  • Type on Any Device: A new type of wireless computer keyboard for your desk that also works with your tablet and smartphone; connect with any Bluetooth-enabled device with external keyboard support. Wireless range: > 10m wireless range
  • Easy-Switch Dial: Simply turn the dial of the Logitech K480 keyboard to switch typing between 3 connected Bluetooth wireless devices, you can work with Windows, macOS, Chrome OS, Android, and iPadOS
  • Familiar Keyboard Layout: Find all the shortcut keys you use the most, but in a space-saving design that lets you place your mouse close to you, for less arm reaching and better posture
  • Integrated Cradle: A cradle to hold your phone or tablet at just the right angle for you to read while you type; fits most phones and tablets up to 0.4 inches thick and 10 inches wide
  • Reliable Power: This portable, wireless Bluetooth keyboard comes with 2 pre-installed AAA batteries which can last up to 24 months (2) and is compatible with wired, wireless or Bluetooth mice. Battery indicator light
deactivate

A project may require native libraries or a specific Python release; read its own instructions before installing dependencies. If a package attempts to compile and reports a missing compiler or header, that is a project-specific prerequisite rather than a failure of the base Python installation.

Run Node.js programs

Execute a JavaScript file

Create a minimal file and run it with the Node.js runtime:

cd ~/projects/example
cat > hello.js <<'JS'
console.log("Hello from Node.js in Termux");
JS
node hello.js

The output should be the message from console.log. Check the runtime independently with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
node --version
node -e 'console.log(2 + 2)'
which node

node -e evaluates a short expression without creating a file, while which node shows the executable selected from Termux’s PATH.

Use npm for a project

Node.js projects commonly describe their dependencies in package.json. In an empty project directory, create that manifest and install dependencies declared by an existing project:

cd ~/projects/example
npm init -y
npm install

npm init -y creates a basic manifest. Use it only for a new project; for a cloned project, run npm install after reviewing its existing package.json. Start a script defined in the manifest with:

npm run start

The script name must exist under the manifest’s scripts object. If it does not, inspect available scripts with:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
npm run

Keep node_modules inside the private Termux project tree. Copy source files or a packaged build to shared storage only when another Android application needs them.

Best Value
Samsers Foldable Bluetooth Keyboard with Touchpad, Ultra Slim Compact,Black | Multi-touch Trackpad, Full Size, Phone Holder, USB-C Charging, 1 Device, for Android Windows iOS Mac OS, Mobile Productivity
  • 【Folding Bluetooth Keyboard & Phone Stand Holder】Extremely thin design of the portable folding keyboard allows you to fold it up and put it in your pocket or bag without taking up too much space. The phone stand holder, best companion for folding keyboard, gives you perfect screen angle. Near-standard size design provides accurate, fast typing, just like the desktop keyboard you are used to. Quiet keys allow you to focus on your work. Perfect gift for travel and business trips!
  • 【Sensitive Touchpad Foldable Keyboard】Upgrade sensitive touchpad supports multi-touch, so you can control the device without using mouse. More convenient and efficient! (NOTE: IOS 13.4 and below or Android 3.0 and below are not supported!!!) Built-in rechargeable battery can last for 48 hours or 560 hours after 2-3 hours of charging. One full charge last enough for your short business trip or vacation!
  • 【Exquisite & Lightweight Portable Keyboard】Dark Black matte exterior, made of ABS+PC material, lightweight but sturdy, without fear of daily wear and scratches. The elegant matte design, excellent touch and clean look make it a perfect match for your tablet, phone and laptop. Only 5.53-ounce, palm-sized keyboard can be folded up and carried around. Provide you with maximum convenience with minimal weight and size. It must be a good choice for editors!
  • 【Stable Connection & Wide Compatibility】Samsers Bluetooth keyboard supports seamless connectivity to all your Bluetooth devices (iOS, Android and Windows). Maintain a stable connection and provide fast response to the device within 10 m. Simply turn on the keyboard and automatically connect to the last connected device. With a Samsers keyboard, you can record all your ideas at any time! (NOTE: this bluetooth keyboard is not compatible with various computer sticks)
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Build a repeatable first-session workflow

The following sequence installs the tools, creates separate sample files, and records the results in one project directory:

  1. Update Termux: pkg update && pkg upgrade.
  2. Install packages: pkg install git python nodejs.
  3. Verify each executable with git --version, python --version, and node --version.
  4. Create a private project root: mkdir -p ~/projects/termux-demo && cd ~/projects/termux-demo.
  5. Initialize Git: git init.
  6. Create hello.py and run python hello.py.
  7. Create hello.js and run node hello.js.
  8. Review the result with git status, stage the files using git add ., and commit them with a message.

This layout lets the three tools operate on the same files without placing Git metadata or dependency directories in Android shared storage.

Troubleshoot installation and runtime problems

pkg reports a repository or mirror error

  • Confirm that the device is online and retry pkg update.
  • Check that the Termux app came from a supported source rather than a deprecated Google Play build.
  • Change to a working mirror with termux-change-repo, then run pkg update && pkg upgrade again. The package-management guidance documents this recovery path.
  • Do not combine add-ons signed by a different distribution source while repairing the installation.

pkg install cannot find Git, Python, or Node.js

First complete pkg update. A stale package index can make an available package appear missing. If the index update itself fails, resolve the mirror or installation-source problem before trying another package name. The package names for this guide are exactly git, python, and nodejs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Git clone, add, or commit fails in Downloads

Move the working tree into a directory below ~, such as ~/projects, and retry the operation there. Use ~/storage/downloads only for importing or exporting files after the Git work is complete.

Termux cannot see Downloads or shared files

Run termux-setup-storage and grant the requested Android permission. Verify the resulting links with ls ~/storage. If a command still cannot write a file, Android’s shared-storage restrictions may be the cause; copy the file into Termux home for editing or building.

The displayed version differs from a tutorial

That is expected in a rolling-release system. Record the output of the local version commands and consult the project’s compatibility requirements. Do not change package repositories merely to reproduce a number printed in an older article.

The command is installed but the shell says “not found”

Run which git, which python, or which node. If the package installation completed but no path is returned, restart Termux and repeat the version check. If the package transaction failed, rerun pkg upgrade and then reinstall the affected package.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep the environment maintainable

Update before starting new work

Because Termux follows a rolling-release package scheme, run pkg update && pkg upgrade periodically and before installing a new project dependency. Updating first reduces conflicts between an old local package set and current package metadata.

Back up source, not generated caches

Use Git remotes or another backup method for source code and configuration that belongs in the project. Avoid treating node_modules, Python virtual environments, build directories, or package caches as irreplaceable backups; they can generally be recreated from manifests after reinstalling dependencies.

Use an external keyboard when typing becomes the bottleneck

Long Git commands and multiline source files are easier with a physical keyboard, but the cited Termux material does not establish a particular model as superior. Choose based on Android compatibility, Bluetooth or wired connection, layout and size, and whether carrying it is acceptable for your workflow. A keyboard is optional; Git, Python, and Node.js run from the on-screen terminal.

Command reference

Goal Command Location or note
Refresh and upgrade packages pkg update && pkg upgrade Run in any Termux directory.
Install the tools pkg install git python nodejs Uses the configured Termux repository.
Verify Git git --version Reports the local Git release.
Verify Python python --version Reports the local Python release.
Verify Node.js node --version Reports the local Node.js release.
Create a project root mkdir -p ~/projects Private Termux home storage.
Initialize Git git init Run inside the project directory.
Run Python python script.py Requires the file in the current directory or a specified path.
Run JavaScript node script.js Requires the file in the current directory or a specified path.
Request shared storage access termux-setup-storage Grant Android permission, then use links under ~/storage.
Repair a bad mirror termux-change-repo Choose a working mirror, then update and upgrade.

Once the three version checks succeed, the installation is complete. The important operational distinction is where files live: keep active Git, Python, and Node.js projects under Termux’s private home, and use the storage links as a controlled bridge to Android’s shared folders.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

AndroidCommand LineGitNode.jsPythonTermux

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.