Termux is a terminal emulator application enhanced with large set of command line utilities ported to Android OS. The main goal is to bring Linux command line experience to users of mobile devices with no rooting or other special setup required.
The terminal emulator is basically an application that launches the command line program by using system call execve(2) and redirecting standard input, output and error streams onto the display.
Most terminal applications available on Android OS work with a very limited set of utilities which are usually provided either by the operating system or other rooting tools such as Magisk. We have decided to go further and port common software usually available on GNU/Linux systems to Android OS.
Termux is neither a virtual machine nor any other kind of emulated or
simulated environment. All provided packages are cross-compiled with
Android NDK and only have compatibility patches to get them working on
Android. The operating system does not provide full access to its file
systems, so Termux cannot install package files into standard
directories such as /bin, /etc, /usr or /var. Instead, all files are
installed into the private application directory located at
/data/data/com.termux/files/usr
. We call that directory "prefix"
and usually refer to it as "$PREFIX" which also an exported
environment variable in the Termux shell. Note that this directory
cannot be changed or moved to an SD-Card because:
In addition to prefix, users can store files in the home directory (or
"$HOME") available at /data/data/com.termux/files/home
. However, the
file system is not the only difference from the traditional Linux
distributions. For more information, read Differences from Linux.
There are a number of common use-cases for the Termux application:
Of course, usage is not limited to the topics listed above. There are more than 1000 packages in our repositories. If these packages don't have what you're looking for, you can compile your own - we have a variety of build tools, including compilers for languages like C, C++, Go, Rust. Interpreters for common languages like NodeJS, Python, Ruby are available too.
Please note that Termux is not a rooting tool and will not give you root privileges unless you are skilled enough to break the Android OS security.
Normally Termux does not require device to be rooted. In fact it's primarily targeted for non-root users.
You may want to root your device to:
Otherwise root isn't necessary and is rather bad than good.
Here are basic tips on how to use Termux and survive:
pkg upgrade
on
regular basis or at least before installing a new package. Not
updating packages or downgrading them voids your warranty.We are not capable of maintaining the whole documentation about Linux commands, shell scripting and other general-purpose information so links to external resources are provided instead.
We strongly suggest that you avoid YouTube tutorials, especially related to hacking. There a lot of clickbait targeted at inexperienced users. If you decide to follow them, ensure that you fully understand the executed commands. Also always check the content of downloaded files. If the content of downloaded scripts is obfuscated, that should be an alarm about potentially unsafe content. Do not complain that Termux has not fulfilled your expectations.
Discover the commands and learn how to use shell effectively.
These links may be useful for advanced users:
When following tutorial examples, remember that Termux is not a Linux
distribution. Some commands may not work, for example ls /home
, due
to non-existent paths and other
differences Linux and Android have
regarding Termux distributions.
The best ways to contribute are:
All of the source code for Termux can be found at https://github.com/termux.