Table of Contents

Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required.

Termux official website

Actually it needs several tweeks. Here are mine:

Customize the keyboard

Typing on a mobile phone isn’t as easy as using a computer keyboard, due to the lack of special characters. Fortunately, Termux provides an easy way to extend the standard keyboard.

Create ~/.termux/ if it doesn’t exist. Make adjustments accordingly.

extra-keys = [ \
    [ 'ESC', '*', '/', 'UP', '-', '(', ')' ], \
    [ 'CTRL', 'TAB', 'LEFT', 'DOWN', 'RIGHT', '{', '}' ] \
screenshot of Termux

Apply new changes by termux-reload-settings. OK. Let’s get started.

A better shell - zsh

Install using pkg, which is a wrapper around apt on Debian.

pkg install zsh
chsh -s zsh

zsh + oh-my-zsh = 🎉

First install git to fetch the source code:

pkg install git
git clone ~/.local/oh-my-zsh

Copy the config template. I prefer putting all configs under ~/.config.

cp ~/.local/oh-my-zsh/templates/zshrc.zsh-template ~/.config/zshrc
ln -s ~/.config/zshrc ~/.zshrc

Set the correct installation path:

export ZSH=$HOME/.local/oh-my-zsh

Pick one favorite theme. This is just an example:


Type ctrl-d and reopen the app. Not so great. 😒

Built-in font alternative

For the above theme to display correctly, a powerline-patched font is required. Nerd fonts seem well suited for this particular job.

The screenshot above uses Monospaced Hack Nerd Font Regular.

Choose whatever you like, and place the file in ~/.termux with the filename font.ttf.

Reload the settings. Much better, right?

File transfer on macOS and Linux

Direct access to the Termux data directory from desktop is impossible without root.

One way to workaround is to use the internal storage as a relay. For Android devices, the internal storage is mounted under /sdcard. This works fine so long as the file permissions are not concerned. (e.g. on Windows)

Here is another way: Run a SSH server in Termux. Install openssh via pkg.

Copy your public key to ~/.ssh/authorized_keys. Pastebin services can be helpful.

To start the daemon, simply type sshd. To stop it, use pkill sshd.

Now you can use scp or other GUI equivalents to transfer files directly.

No more Pydroid

Just install the python package.

Optionally, install ipython (aka jupyter) for an enhanced interactive interface.

pkg install libzmq
pip install jupyter