1. Introduction

This is a Termux presentation created by Paulo Jer么nimo using the AsciiDoc Syntax.

Download and build this presentation using your own Android device by following these steps:

  1. Install Termux and start it.

  2. Type the following commands into the shell:

    $ pkg install git
    $ git clone https://github.com/paulojeronimo/termux-presentation
    $ cd $(basename $_)
    $ ./build.sh
  3. Open the generated doc:

    $ termux-open build/singlepage/index.html

2. Who is Paulo Jer么nimo?

2.1. An experienced software developer

  1. Doing application architecture and software development, with security in mind, for some customers.

  2. Creating labs and tutorials (like this one) using some tools like ncat, OpenSSL, OpenPGP, Passbolt, Keycloak, mitmproxy, Termux and many others.

2.2. A lazy (and fat) triathlete (in this COVID-19 moment)

  1. Not so intense in physical training at this moment.

    1. But with three (3) finished Ironman proofs.

  2. I’m writing some web and mobile apps in lazy mode to a personal project named Finisher.Tech.

    1. Using React Native and Solidity (Ethereum Blockchain).

3. What is Termux?

Termux is an Android terminal application and Linux environment.

3.1. How to install?

  1. Users normally go to Play Store and download it.

  2. Some categories of users like to install by trailing other paths:

3.2. What can I do with it?


4. Termux for developers (we! 馃槑)

4.1. Creating and using a desktop development environment (with Docker)

4.1.1. Prerequisites

  1. A Bash shell running on macOS, Linux or Windows (with Cygwin installed).

  2. Docker installed. (of course! 馃槃)

Until now, the steps below were tested only in macOS and Ubuntu Linux operating systems. Here are the details:

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.6
BuildVersion:   19G2021

$ docker --version
Docker version 19.03.12, build 48a66213fe
$ cat  /etc/lsb-release

$ docker --version
Docker version 19.03.12, build 48a66213fe

4.1.2. Clone paulojeronimo/termux-docker

Here I present you a nice and productive way to create your applications before package than and liberate their use.

$ mkdir ~/lab-termux && cd $_
$ git clone https://github.com/paulojeronimo/termux-docker && cd `basename $_`
You can also fork this repo and use your own! 馃槂
You will see that my repo is a fork too (with some improvements) from xeffyr/termux-docker!

4.1.3. Build and run your own Docker image

Copy config.sample.sh to config.sh and configure your Docker Hub username on it.

$ cp config.sample.sh config.sh
$ sed -i 's/xeffyr/paulojeronimo/g' config.sh
  1. If you are using macOS, change the last command to gsed.

  2. Change paulojeronimo to your username on Docker Hub.

Invoke build-all.sh script:

$ ./build-all.sh

Test a docker container creation by invoking the run.sh script:

$ ./run.sh

Type Ctrl+D to exit.

Note (by typing a docker ps -a) that a container named termux-docker-i686-XXXXXXX will remain running.

4.2. Test your Docker image to build this site

4.2.1. Clone paulojeronimo/termux-presentation

$ cd ~/lab-termux
$ git clone https://github.com/paulojeronimo/termux-presentation && cd `basename $_`

4.2.2. Copy the run.sh and config.sh (from termux-docker)

$ cp ../termux-docker/run.sh ./termux-docker.sh
$ cp ../termux-docker/config.sh .

4.2.3. Build this site by creating a termux-docker container

$ ./termux-docker.sh

Sample output for the command above:

Creating new container...

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

Updating static DNS: dl.bintray.com termux.net termux.org github.com codeload.github.com gist.github.com gist.githubusercontent.com raw.githubusercontent.com


Call build.sh inside the shell provided by the container:

$ ./build.sh
Building content in termux environment ...
Skipping the call to "build-multipage-version" for termux environment!
Reason: termux can not run Docker (Yet! Maybe someday!?)
Follow this link:
Generated content (the "build" directory tree shown below):
鈹斺攢鈹 singlepage
    鈹溾攢鈹 asciidoctor.css
    鈹斺攢鈹 index.html

1 directory, 2 files
In the first execution of the command above, the build.sh script will install the required packages. So, the output will be more extensive than showed.

5. Some references