Termux is an Android terminal emulator and a Linux environment. It can be used to run most Linux software without root. This guide will help at setting up and configuring Termux.
Installation
Download and install Termux. Installing Termux-API is also recommended.
Run Termux and wait for it to download bootstrap packages.
Select your mirrors and update packages.
termux-change-repopkg upgrade
If you also installed Termux-API, install the Termux API package.
pkg install termux-api
If you installed Termux-API, configure access to external storage. When Android prompts you to allow access to external storage, press “Allow” to continue.
termux-setup-storage
Install essential utilities.
pkg install file man mc tree \ git git-lfs gh gnupg \ lazygit iproute2# OPTIONAL: for developmentpkg install clang composer \ dotnet-sdk-9.0 golang \ nodejs openjdk-21 \ php python uv
Termux supports remote connections via the Secure SHell (SSH) protocol. Follow the instructions below to install and configure SSH. More info can be found in their wiki.
Set SSH password. (This will prompt you to enter a password twice.)
passwd
Enable the sshd service by enabling it via termux-services.
sv-enable sshd
Using another machine, connect to Termux using the following command:
ssh user@device_ip -p 8022
Change user and device_ip with your Termux username and your device’s IP address respectively. You can find them using the whoami and ip -c addr commands.