Termux

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

  1. Download and install Termux. Installing Termux-API is also recommended.

  2. Run Termux and wait for it to download bootstrap packages.

  3. Select your mirrors and update packages.

    termux-change-repo
    pkg upgrade
  4. If you also installed Termux-API, install the Termux API package.

    pkg install termux-api
  5. 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
  6. Install essential utilities.

    pkg install file man mc tree \
         git git-lfs gh gnupg \
         lazygit iproute2
     
    # OPTIONAL: for development
    pkg install clang composer \
         dotnet-sdk-9.0 golang \
         nodejs openjdk-21 \
         php python uv

Enabling SSH Remote Connections

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.

  1. Install SSH and termux-services.
    pkg install openssh termux-services
  2. Set SSH password. (This will prompt you to enter a password twice.)
    passwd
  3. Enable the sshd service by enabling it via termux-services.
    sv-enable sshd
  4. 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.