Published 2 years ago: May 29, 2019
Updated: December 04, 2020
Code snippets for Termux , a brilliant terminal emulator for Android.
This cheatsheet is a small collection of handy snippets for quick reference in tricky situations. Feel free to suggest edits, propose additions, complain about something, disagree with content or such and the like. Every feedback is a welcome one.
Termux & MariaDB
How to run MariaDB, a drop-in alternative to MySQL, on Termux
# Install MariaDB pkg mariadb # Run this multi-line command cd '/data/data/com.termux/files/usr' ; \ /data/data/com.termux/files/usr/bin/mysqld_safe \ --datadir='/data/data/com.termux/files/usr/var/lib/mysql'
Open files from within Termux
Open a file reachable by Termux, and view it in any Android app. I.E. send a file by email or view/edit an image in an editor.
This will request the "open in" prompt. Handy for viewing images, PDF or any other file format not viewable in a terminal.
After installation, on database initialization PostgreSQL server is unable to start.
$ initdb the following exception is raised
If matplotlib fails to install:
pip3 install wheel
pkg install libzmq pip3 install jupyter