Termux is an amazing open-source Android app that primarily offers terminal emulation. However, it is something much more than a terminal. Using Termux is like you have a Linux distribution inside your Android device. Without rooting the device. Without any special setup.
A basic set of Linux commands is available and you can install more packages using the apt package manager.
You can use Termux with the Android virtual keyboard, but using an external keyboard is much more convenient.
Great documentation is available in their wiki. The packages list is available here.
Although you can set up a lot of packages in Termux, the most important thing (according to my opinion) is the ability to securely connect with a remote server using SSH. In this server, you may have any software you want 🙂
Installation
Install Termux at Google Play Store here.
Start a session
Starting Termux, you will get the following welcome screen:
Welcome to Termux!
Wiki: https://wiki.termux.com
Community forum: https://termux.com/community
Gitter chat: https://gitter.im/termux/termux
IRC channel: #termux on freenode
Working with packages:
* Search packages: pkg search <query>
* Install a package: pkg install <package>
* Upgrade packages: pkg upgrade
Subscribing to additional repositories:
* Root: pkg install root-repo
* Unstable: pkg install unstable-repo
* X11: pkg install x11-repo
Report issues at https://termux.com/issues
$
Here is a screenshot of welcome screen
Left panel
You can manage sessions from Termux left panel (swipe from the left to right to display it).
From this panel you can also show/hide Android keyboard.
Copy – Paste inside Termux
In most devices (with external keyboard), Ctrl+Shift+C (for copy) and Ctrl+Shift+V (for paste).
What is always working is the “long pressing anywhere on the terminal”:
Font size
There are 3 ways to change font size:
- Use the “two-finger pinch gesture” as usual to magnify the screen (or the opposite)
- Use CTRL ALT + from the command line to increase the font size and CTRL ALT – for the opposite
- Use Termux Styling for a small cost
Common commands
$ whoami
u0_a255
$ pwd
/data/data/com.termux/files/home
$ ls -la total 11
drwx------ 2 u0_a255 u0_a255 3488 Aug 12 22:16 .
drwx------ 4 u0_a255 u0_a255 3488 Aug 12 21:37 ..
-rw------- 1 u0_a255 u0_a255 95 Aug 15 12:43 .bash_history
$ date
Sat Aug 15 12:44:24 EEST 2020
$
Text editors
nano is available by default.
For other popular editors see https://wiki.termux.com/wiki/Text_Editors
Color Bash prompt
If you want to colorize bash prompt
cd ~
nano .bashrc
Add the following
PS1='${debian_chroot:+($debian_chroot)}[