📱 Termux Guide 2026 – Complete Termux Resource Hub
📑 Table of Contents
Imagine running Python, hosting a web server, or even using Git – all from your Android phone. With Termux, you can do exactly that. Termux is a free, open‑source terminal emulator and Linux environment that runs directly on your Android device without root. In this guide, I'll show you how to install it, master the basics, and unlock its full potential.
1. What is Termux and Why Should You Use It?
Termux brings a lightweight Linux environment to your pocket. It includes a package manager (pkg) that lets you install hundreds of tools: Python, Node.js, Git, SSH, Vim, and much more. You can use it to:
- Learn Linux commands without a PC
- Write and run Python/JavaScript code on the go
- Host a simple HTTP server or Telegram bot
- Connect to remote servers via SSH
- Automate tasks with shell scripts
- Practice ethical hacking tools (with care)
- Manage files with Linux commands
- Use Git for version control
- Run web applications locally
- Learn programming on your phone
It's a full development environment that fits in your pocket – and it's completely free.
2. Installing Termux
You can't download Termux from the Play Store anymore (it's outdated there). Install it from F‑Droid, the open‑source app store:
- Download and install F‑Droid from f-droid.org
- Open F‑Droid, search for Termux, and install it
- Launch Termux – you'll see a black terminal with a blinking cursor. That's your new Linux playground
Once installed, run this command to update everything:
This updates the package lists and all installed packages to their latest versions.
3. Basic Termux Commands
The commands are identical to a desktop Linux terminal. Start with these:
$ ls # List files and folders
$ cd storage # Change directory to the internal storage
$ mkdir myproj # Create a new directory named "myproj"
$ touch hello.txt # Create an empty file
$ cat hello.txt # Display the contents of the file
$ rm hello.txt # Delete the file (be careful!)
$ clear # Clear the terminal screen
Essential commands table:
| Command | Description | Example |
|---|---|---|
pwd |
Print working directory | pwd → /data/data/com.termux/files/home |
ls |
List files and folders | ls -la shows hidden files |
cd |
Change directory | cd storage/downloads |
mkdir |
Create a directory | mkdir myfolder |
touch |
Create an empty file | touch file.txt |
cat |
Display file contents | cat file.txt |
rm |
Remove a file | rm file.txt |
clear |
Clear the screen | clear |
cp |
Copy a file | cp file.txt backup.txt |
mv |
Move a file | mv file.txt /storage/ |
echo |
Print text | echo "Hello" |
nano |
Text editor | nano file.txt |
4. Accessing Your Phone's Storage
By default, Termux works inside its own private folder. To access your photos, downloads, and other files, give it storage permission:
After granting permission, you'll see a storage folder inside your home directory. You can now read and write files anywhere on your internal storage.
cd storage/downloads to access your Downloads folder directly.
Storage folder structure:
storage/downloads– Download folderstorage/dcim– Camera photosstorage/music– Music folderstorage/pictures– Pictures folderstorage/shared– Internal storage root
5. Installing Packages – Python, Git, and More
Termux uses pkg (a wrapper for apt) to install software. For example, to install Python:
After installation, type python to launch the interactive shell. Press Ctrl+D to exit.
Essential packages for development:
$ pkg install nodejs # Node.js and npm
$ pkg install vim # Text editor
$ pkg install openssh # SSH client/server
$ pkg install wget curl # Download files
$ pkg install php # PHP runtime
$ pkg install mariadb # MySQL‑compatible database
$ pkg install python-pip # Python package manager
$ pkg install rust # Rust programming language
$ pkg install golang # Go programming language
| Package | Purpose | Install Command |
|---|---|---|
python |
Python programming language | pkg install python |
nodejs |
Node.js JavaScript runtime | pkg install nodejs |
git |
Version control system | pkg install git |
vim |
Text editor | pkg install vim |
openssh |
SSH client and server | pkg install openssh |
php |
PHP runtime | pkg install php |
mariadb |
Database server | pkg install mariadb |
rust |
Rust programming language | pkg install rust |
golang |
Go programming language | pkg install golang |
6. Running a Simple HTTP Server
With Python installed, you can start a basic web server in any directory:
$ python -m http.server 8080
Open your phone's browser and go to http://localhost:8080. You'll see your files served as a website. (Use Ctrl+C to stop the server.)
For a more serious web server, you can install Apache or Nginx:
$ nginx
Run a Node.js server:
$ npm install express
$ node server.js
7. Using SSH – Connect to Remote Servers
Termux can act as an SSH client, allowing you to manage your VPS or cloud server right from your phone:
You can even run an SSH server on your phone to access it from a computer:
$ sshd
$ passwd # Set a password first
ssh -p 8022 to connect to Termux's SSH server (it runs on port 8022 by default).
8. Writing and Running Scripts
Create a shell script with vim or nano:
$ chmod +x hello.sh
$ ./hello.sh
Python script example:
$ python hello.py
Automation with cron:
$ crontab -e
# Add: 0 6 * * * python /path/to/script.py
9. Customizing Termux
Essential add‑ons:
Termux:Float
Floating window mode
Termux:API
Phone sensors, battery, clipboard
zsh + oh-my-zsh
Colorful terminal with auto-suggestions
tmux
Multiple terminal sessions
Powerlevel10k
Beautiful zsh theme
How to install zsh:
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
How to install tmux:
$ tmux new -s mysession
10. Project Ideas Using Termux
Telegram Bot
Create a Telegram bot using Python or Node.js. Automate tasks and respond to commands.
Web Scraper
Build a web scraper using Python with BeautifulSoup or Scrapy. Extract data from websites.
Local Web Server
Host a simple website with Python HTTP server or Nginx on Termux.
File Management
Automate file organization with Bash scripts. Sort downloads, photos, and documents.
SSH Server
Run an SSH server on Termux and access your phone from a computer.
Note-taking App
Create a simple note-taking app using Python and SQLite database.
11. Common Problems and Fixes
- "command not found" – You need to install that package first. Use
pkg install package-name - Storage permission not working – Run
termux-setup-storageagain and grant the permission - Battery optimization killing Termux – Disable battery optimization for Termux in your phone settings
- Screen goes black – Increase screen timeout or use "Keep screen on" apps
- Package not found – Run
pkg updatefirst to refresh the package list - Network connection errors – Check your internet connection and try again
- Termux crashes – Clear cache or reinstall Termux from F-Droid
Termux is your gateway to the Linux world. Once you're comfortable, try our full Ubuntu beginner guide.
Final Thoughts
Termux transforms your phone into a portable Linux lab. Whether you're learning programming, managing servers, or just tinkering, the skills you build with Termux apply directly to real‑world IT jobs. Best of all – it's free, open‑source, and always in your pocket.