Termux Complete Tutorial ^new^ May 2026

# PHP pkg install php php -S localhost:8080 python -m http.server 8000

pkg update && pkg upgrade Fix: You cannot write directly to /sdcard/ . Use ~/storage/shared/ instead. termux complete tutorial

Note: These take time and space.

pkg install openssh passwd # Set a password for the 'termux' user whoami # Returns 'u0_aXXX' – that's your username Start SSH server: sshd (Note: runs on port 8022, not 22). From laptop: ssh u0_aXXX@phone_ip -p 8022 ssh root@your_server_ip 5.4 Termux:API (Hardware Control) Install the Termux:API app from F-Droid, then: # PHP pkg install php php -S localhost:8080 python -m http

pkg search . (It lists every single tool you can install. The list is huge.) pkg install openssh passwd # Set a password

cp myfile.txt ~/storage/shared/Downloads/ Fix: Usually a memory issue. Close other apps or use termux-wake-lock to prevent Android from killing Termux during long builds. Enable Wake Lock (Prevent Doze mode): pkg install termux-api termux-wake-lock Fixing broken Python installs: pkg reinstall python Part 8: Pro Tips and Workflow Optimization 8.1 Run Background Services Append & to run a process in the background, even after closing the terminal: