Fundamentals 6 min read

Unlock Android Power: A Complete Guide to Using Termux Without Root

This article introduces Termux, an open‑source Linux terminal emulator for Android that runs without root, explains how to replace its package source with a domestic mirror, configure storage permissions, use essential pkg commands, and set up simple applications like an HTTP server and a hacker‑style display.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Unlock Android Power: A Complete Guide to Using Termux Without Root

Termux is an open‑source Linux terminal emulator for Android that uses pkg (apt) for package management and runs without root permissions.

It can perform simple Linux tasks such as Bash/Zsh, Vim editing, SSH access, compiling with GCC/Clang, Git operations, and running MySQL, Redis, and other servers.

Usage

Initial Setup

It is common practice to replace the official package source with a domestic mirror. For Termux, you can use the TUNA mirror as follows:

$ sed -i 's@^\(deb.*stable main\)$@#\1
deb https://mirrors.tuna.tsinghua.edu.cn/termux stable main@' $PREFIX/etc/apt/sources.list # replace source file
$ pkg up # update source file
$ pkg update -y && pkg upgrade # update system and packages

After changing the source, enable Termux storage permissions:

$ termux-setup-storage

When the command runs, a permission dialog appears; choose “Always allow”.

Permission confirmation
Permission confirmation

pkg Command Cheat Sheet

pkg search – search packages

pkg install – install packages

pkg uninstall – uninstall packages

pkg update – update source list

pkg upgrade – upgrade installed packages

pkg show – display detailed information about a package

Long Press Screen

Long press
Long press

Long‑pressing the screen allows you to copy and paste text within Termux.

Extra Key View

Extra keys
Extra keys

Above the normal keyboard, Termux provides an extra row with ESC, Tab, CTRL, ALT, dash, and arrow keys, enabling functions that are missing on the Android soft keyboard.

Volume+ Combos

Volume+ Q – toggle extra key view

Volume+ number – Fx (function keys)

Volume+ L – | (pipe)

Volume+ H – ~ (tilde)

Volume+ U – _ (underscore)

Volume+ P – previous page

Volume+ N – next page

Some Simple Applications

HTTP Server

You can quickly share files on the same LAN by installing a Python HTTP server:

$ pkg install python -y # need Python
$ ifconfig wlan0 # view Android IP address on the LAN (e.g., 192.168.2.104)
$ python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/)...

After the command starts, note the displayed port (8000). From another device on the same network, open a browser and navigate to 192.168.2.104:8000 to access the file server.

HTTP server
HTTP server

Looks Like a Hacker

To add a “hacker‑style” falling‑rain effect, install the cmatrix package:

$ pkg install cmatrix
Cmatrix
Cmatrix

References

Termux – https://termux.com/

Termux mirror – https://mirror.tuna.tsinghua.edu.cn/help/termux/

Learn Termux – https://github.com/breathiness/learn-termux

Advanced Termux tutorial – https://www.sqlsec.com/2018/05/termux.html#toc-heading-2

Termux tutorial – http://www.ruanyifeng.com/blog/2019/07/termux-tutorial.html

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Androidcommand-linepackage managementterminalTermux
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.