Termux is a terminal emulator for Android combined with a collection of packages for command line software. This help explains both the terminal interface and the packaging tool available from inside the terminal.
Want to ask a question, report a bug or have an idea for a new package or feature? Visit the Google+ Termux Community!
At launch Termux shows a terminal interface, whose text size can be adjusted by pinch zooming or double tapping and pulling the content towards or from you.
Besides the terminal (with keyboard shortcuts explained below) there are three additional interface elements available: A context menu, navigation drawer and notification.
The context menu can be shown by long pressing anywhere on the terminal. It provides menu entries for:
The navigation drawer is revealed by swiping from the left part of the screen. It has three elements:
The notification, available when a terminal session is running, is available by pulling down the notification menu. Pressing the notification leads to the most current terminal session. The notification may also be expanded (by pinch-zooming or performing a single-finger glide) to expose three actions:
With a wake or wifi lock held the notification and Termux background processes will be available even if no terminal session is running, which allows server and other background processes to run more reliably.
Using the Ctrl key is necessary for working with a terminal - but most touch keyboards does not include one. For that purpose Termux uses the Volume down button to emulate the Ctrl key. For example, pressing Volume down+L on a touch keyboard sends the same input as pressing Ctrl+L on a hardware keyboard. The result of using Ctrl in combination with a key depends on which program is used, but for many command line tools the following shortcuts works:
The Volume up key also serves as a special key to produce certain input:
The following shortcuts are available when using Termux with a hardware (e.g. bluetooth) keyboard by combining them with Ctrl+Shift:
A minimal base system consisting of the Apt package manager and the busybox collection of system utilities is installed when first starting Termux. Additional packages are available using the apt command:
Apt as a package manager uses a package format named dpkg. Normally direct use of dpkg is not necessary, but the following two commands may be of use:
View the apt manual page (execute apt install man to install a man page viewer first) for more information.
By default the busybox version of vi is available. This is a barebone and somewhat unfriendly editor - install nano for a more straight-forward editor and vim for a more powerful one.
By installing the openssh package (by executing apt install openssh) you may SSH into remote systems, optionally putting private keys or configuration under $HOME/.ssh/.
If you wish to use an SSH agent to avoid entering passwords, the Termux openssh package provides a wrapper script named ssha (note the 'a' at the end) for ssh which:
This means that the agent will prompt for a key password at first run, but remember the authorization for subsequent ones.
The base system that is installed when first starting Termux uses the bash shell while zsh is available as an installable alternative:
Termux is designed to cope with the restrictions of running as an ordinary Android app without requiring root, which leads to several differences between Termux and a traditional desktop system. The file system layout is drastically different:
Besides the file system being different, Termux is running as a single-user system without root - each Android app is running as its own Linux user, so running commands inside Termux may not interfere with other installed applications.
Running as non-root implies that ports below 1024 cannot be bound to. Many packages have been configured to have compatible default values - the ftpd, httpd, and sshd servers default to 8021, 8080 and 8022, respectively.
The API add-on exposes Android system functionality such as SMS messages, GPS location or the Text-to-speech functionality through command line tools.
The Float add-on consists of a floating terminal window visible while running other apps.
The Styling add-on provides color schemes and fonts to beabeautify and customize the appearance of the Termux terminal.
The Widget add-on brings a widget to your homescreen, providing links to run scripts in your $HOME/.shortcuts/ folder.
Termux uses terminal emulation code from Terminal Emulator for Android which is under the Apache License, Version 2.0. Packages available through Termux are distributed under their respective licenses with scripts and patches used to build them available on github.