Have you ever wanted a complete Linux terminal environment on your Android phone? Not just a terminal emulator with basic commands, but a comprehensive Linux command-line environment with all the utilities and packages you've grown accustomed to? If so, then Termux is the answer.

Termux is a powerful terminal emulation software, which is similar to the popular Terminal Emulator app, but it also includes an extensive Linux Package Collection. Termux's package management system is much like Debians Advanced Package Tool (APT) in that you can search, install, and uninstall with the command apt. Termux installs just a few basic packages out of the box, to reduce APK size on the Play Store, but allows you to install any extra packages that you desire. While there are several alternatives to Termux on the Google Play Store, none of them offer nearly as many packages as Termux.

Recommended Reading: Learn how to install a full GNU/Linux environment on your Android device.


Termux - The Linux Terminal Emulator for Android

Termux packages are built using Ubuntu 16.10, so this means that developers can compile any existing software from their machine and then add it to the package manager for anyone to download. It is a very simple and elegant solution to what otherwise could be a complex and difficult problem. One amazing side affect of this is that once the software is compiled, you have full fledged versions of the software rather than half-baked, ported versions of desktop Linux packages.

For example, I use the command line on my Mac as I prefer to have my hands on the keyboard 90% of the time. I therefore use keyboard shortcuts and terminal applications to get most of my work done. I prefer to use Vim as it's an amazing text editor and has plugins for nearly everything including Microsoft .NET! I have various plugins that I use daily and I've tried some of these with Vim installed in Termux - with great success. Everything I tried works exactly as I expected. One of my favorite plugins is CtrlP, a powerful file finder, which worked beautifully in Vim on Termux.

Termux gives you a bash terminal by default, but if you are like me and prefer Zsh for its advanced features, FISH shell is also available. Multiple different shell types is certainly welcome.

Anyone that has used a terminal emulator application on Android knows the pain when you need to enter special keys to control the terminal such as CTRL or ESC. These keys aren't displayed on the standard touch keyboards used on android devices (save for Hacker Keyboard). Termux developer Fredrik Fornwall, though, has a very novel solution to this. He has bound CTRL to the Volume DOWN key and other special keys like ESC to the Volume UP key. Therefore, by pressing Volume Up + the touch keyboard 'L' you can input the terminal command CTRL + 'L' which clears the terminal window. The ESC key is sent by pressing volume UP + 'E' key for example. You can view all the keys available in Termux on the developer's website.

I also use SSH in Termux to connect to my personal VPS servers. Although there exist other Android applications such as JuiceSSH and ConnectBot, having a proper SSH connection via OpenSSH in a proper terminal environment is better in my opinion. Termux enables you to create multiple sessions so I can have my server connections on one session and my local environment on another session.

If you like to develop in the terminal, Termux has you covered there as well. I installed python on my phone with Termux's package manager and was writing python code exactly the same as I would on my remote server.

What something slightly heavier, such as developing with NodeJS? Termux has support for NodeJS as well, and it goes even further by supporting popular stacks such as Express. I was able to install a full NodeJS/Express/Bootstrap environment and host a simple website on my device.

I was also able to install and use Ruby as well, however I did run into problems when I was initially installing Rails. Fortunately, I was able to get Rails running on my device with the help of the Termux Google+ community which is very active and a great source of help if you get stuck. To put it bluntly I am extremely impressed with Termux and its package management system. It provides an amazing package list that is constantly growing; I haven't missed any packages that I use daily so far. I did however notice that the popular SCREEN terminal multiplexer was not available but the alternative (and in my opinion better) TMUX is available.

The device that I tested all of this on is not a flagship phone, either. I am using my Xiaomi Mi Max with 4GBs of RAM and a Snapdragon 650 SoC, along with an Apple Bluetooth keyboard. The main reason I am using this phone is because the Xiaomi Mi Max has a 6.44" screen, giving me a decent real estate to work with. With the setup shown above I can comfortably do some serious work on the go.

The most amazing thing about Termux is that it is completely free - there are no in-app purchases or advertisements. Although, you can purchase some of the add-ons which have a small fee, to support the developer and improve upon the already-impressive functionality of Termux. The addons so far include:

  • Termux:Task - Integrating Termux with Tasker
  • Termux:API - Allows Termux to integrate with existing Android APIs (such as reading your SMS messages in the terminal)
  • Termux:Widget - Execute Termux scripts from the home screen
  • Termux:Styling - Customize the appearance of Termux
  • Termux:Float - Allows a floating Termux window

Termux is now a permanent installation on all of my Android devices; it allows me to have a fully functional terminal and development environment on my local device. I spend a lot of time developing on remote servers, but sometimes you are in a situation where you cannot connect to a server. Recently, I took a trip to New Zealand which involved an 11 hour flight there and back. If I had Termux installed at that time, my flights could have become a 22 hour-in-total coding session.


Download Termux on the Play Store

List of Available Termux Packages (Or Build Your Own)

Check out the Termux Google+ Community