50 Essential Termux Commands Every Beginner Must Know (2026)
50 Essential Termux Commands Every Beginner Must Know (2026)
- Introduction
- Getting Started — Setup & Navigation Commands
- File Management Commands
- Package Management & Installation Commands
- Networking Commands
- Text Editing, Scripting & Productivity Commands
- Common Errors and Fixes
- Pro Tips for Termux Beginners
- Termux vs Traditional Linux Terminal — Comparison
- FAQ
- Conclusion
// 01 — Introduction
If you've just installed Termux on your Android device and are staring at a blank terminal wondering what to do next, this guide is exactly what you need. Termux commands are the foundation of everything you'll ever do in this powerful Linux environment — from installing tools and managing files to running scripts and exploring networking. Whether you're a student, a developer, or someone just curious about Linux on Android, learning these essential Termux commands will completely transform how you use your phone.
Termux is not just a terminal emulator — it's a full Linux environment that runs directly on Android without requiring root access. It gives you access to a package manager, a bash shell, Python, Git, SSH, and hundreds of open-source tools. But all of that power starts with knowing the basic commands.
In this guide, compiled by Rixon Xavier of HYDRA TERMUX, you'll learn 50 essential Termux commands organized into logical categories so you can learn progressively. Every command is explained clearly with real examples and expected output so you know exactly what's happening when you type it. We've tested every command on Android in 2026, and none of them require root access.
By the end of this tutorial, you'll be able to navigate the filesystem, install and remove packages, manage files, run scripts, use basic networking tools, and work productively inside Termux. Let's get started!
// 02 — Getting Started: Setup & Navigation Commands
The very first thing you need to do in any Linux environment — including Termux — is learn how to move around and orient yourself. These navigation commands are the building blocks of everything else. Think of them as learning to walk before you run.
1. pwd — Print Working Directory
This command tells you exactly where you are in the filesystem right now. When you open Termux fresh, you're in your home directory. pwd confirms that.
pwd
Output: /data/data/com.termux/files/home
2. ls — List Directory Contents
Lists all files and folders in your current directory. One of the most-used commands in any Linux terminal.
ls
ls -la
The -la flag shows hidden files and detailed info like file size and permissions.
3. cd — Change Directory
Navigate between folders using cd. This is how you move around in Termux.
cd /sdcard # go to phone storage
cd ~ # go to home directory
cd .. # go up one level
cd Downloads # enter Downloads folder
4. clear — Clear the Terminal Screen
When your terminal gets messy with output, clear wipes the screen clean. You can also press Ctrl + L.
clear
5. termux-setup-storage — Grant Storage Access
This is the first command most beginners should run. It grants Termux permission to access your phone's internal storage so you can work with files in /sdcard.
termux-setup-storage
6. whoami — Check Current User
whoami
Output: u0_a123 (your Android user ID — Termux runs as a regular Android user, no root needed)
7. uname -a — System Information
Displays your Linux kernel version and architecture information.
uname -a
Output example: Linux localhost 5.10.101-android13... aarch64
8. history — View Command History
Lists all commands you've run recently. Very useful for recalling what you typed earlier.
history
history | tail -20 # last 20 commands
9. exit — Close Termux Session
exit
10. help — Get Command Help
For any command, add --help at the end to see its usage options.
ls --help
curl --help
// 03 — File Management Commands
After navigation, the next skill every Termux beginner needs is managing files. These Termux commands let you create, copy, move, delete, read, and search through files — all from the command line. File management in the terminal is much faster than using a file manager app once you get the hang of it.
11. mkdir — Make Directory
Creates a new folder. You can create nested folders in one command using -p.
mkdir myfolder
mkdir -p projects/python/scripts
12. touch — Create an Empty File
touch notes.txt
touch script.py
13. cp — Copy Files
cp notes.txt backup.txt
cp -r myfolder/ myfolder_backup/ # copy a whole folder
14. mv — Move or Rename Files
mv notes.txt documents/notes.txt # move
mv oldname.txt newname.txt # rename
15. rm — Remove Files
rm notes.txt
rm -rf myfolder/ # delete folder and all contents
rm -rf is permanent. There is no Recycle Bin in Termux. Double-check before you run it.16. cat — Read a File
cat notes.txt
17. less — Read Large Files Page by Page
Better than cat for long files. Press q to quit, arrow keys to scroll.
less largefile.txt
18. grep — Search Inside Files
Searches for a specific word or pattern inside a file.
grep "error" logs.txt
grep -i "python" notes.txt # -i = case insensitive
19. find — Search for Files
find . -name "*.py" # find all Python files
find /sdcard -name "photo.jpg"
20. chmod — Change File Permissions
Makes a script executable so you can run it directly.
chmod +x myscript.sh
./myscript.sh
// 04 — Package Management & Installation Commands
One of Termux's greatest strengths is its package manager, pkg. With a few Termux commands, you can install Python, Git, Node.js, SSH, and hundreds of other tools directly on your Android device — no root required. This section covers everything you need to know about managing packages in Termux.
21. pkg update — Update Package List
Always run this before installing anything. It fetches the latest list of available packages.
pkg update
22. pkg upgrade — Upgrade Installed Packages
pkg upgrade
pkg update && pkg upgrade together regularly to keep your environment up to date.23. pkg install — Install a Package
pkg install python
pkg install git
pkg install curl wget nano
24. pkg uninstall — Remove a Package
pkg uninstall nano
25. pkg search — Search for a Package
pkg search python
pkg search node
26. pkg list-installed — See Installed Packages
pkg list-installed
27. pip install — Install Python Libraries
Once Python is installed, use pip to install Python packages.
pip install requests
pip install flask
pip install numpy
28. npm install — Install Node.js Packages
After installing Node.js via pkg, use npm for JavaScript packages.
pkg install nodejs
npm install -g express
29. dpkg -l — List All Debian Packages
dpkg -l | grep python
30. apt — Alternative Package Manager
apt is also available in Termux and works similarly to pkg.
apt install git
apt remove git
apt list --installed
// 05 — Networking Commands
Termux has excellent networking capabilities built in. These Termux commands let you test internet connectivity, download files, check your IP address, scan your local network, transfer files securely, and much more. All of these are useful for learning networking fundamentals — no hacking intent required.
31. ping — Test Internet Connectivity
ping google.com
ping -c 4 google.com # send only 4 packets
32. curl — Transfer Data from URLs
One of the most powerful and flexible networking tools. Used for downloading, testing APIs, and more.
curl https://api.ipify.org # check your public IP
curl -O https://example.com/file.zip # download a file
curl -I https://google.com # check HTTP headers
33. wget — Download Files
wget https://example.com/file.zip
wget -c https://example.com/largefile.zip # resume download
34. ifconfig / ip addr — View Network Interfaces
pkg install net-tools
ifconfig
ip addr show
35. nmap — Network Scanner
Nmap is the industry-standard tool for scanning networks. Use it to explore your own local network.
pkg install nmap
nmap 192.168.1.1 # scan your router
nmap -sP 192.168.1.0/24 # discover devices on your network
36. ssh — Secure Shell Connection
Connect to a remote server or another device securely.
pkg install openssh
ssh user@192.168.1.100
ssh user@yourserver.com -p 22
37. scp — Securely Copy Files Over SSH
scp notes.txt user@192.168.1.100:/home/user/
scp user@192.168.1.100:/home/user/file.txt .
38. netstat — View Network Connections
pkg install net-tools
netstat -tuln # show open ports and listening services
39. traceroute — Trace Network Path
pkg install traceroute
traceroute google.com
40. git clone — Clone a Repository
Download any GitHub project to your phone in seconds.
pkg install git
git clone https://github.com/username/repository.git
// 06 — Text Editing, Scripting & Productivity Commands
Once you know how to navigate, manage files, install packages, and use networking tools, it's time to learn how to actually write and run code in Termux. These Termux commands are essential for scripting, automation, and everyday productivity tasks inside your terminal.
41. nano — Simple Text Editor
Nano is the most beginner-friendly terminal text editor. Use it to write scripts and edit config files.
pkg install nano
nano myscript.sh
Inside nano: Ctrl+O to save, Ctrl+X to exit.
42. vim — Advanced Text Editor
pkg install vim
vim script.py
Press i to enter insert mode, Esc to exit it, :wq to save and quit.
43. python — Run Python Scripts
python --version
python myscript.py
python3 myscript.py
44. bash — Run Shell Scripts
bash myscript.sh
# or after chmod:
./myscript.sh
45. echo — Print Text
Used in scripts to display messages, and also to write content into files.
echo "Hello, Termux!"
echo "My text" > file.txt # write to file
echo "More text" >> file.txt # append to file
46. top / htop — Monitor System Resources
top
pkg install htop
htop
47. ps — List Running Processes
ps aux
ps aux | grep python # find Python processes
48. kill — Stop a Process
kill 1234 # replace 1234 with the process ID
kill -9 1234 # force kill
49. alias — Create Command Shortcuts
Save time by creating short aliases for long commands.
alias update="pkg update && pkg upgrade"
alias ll="ls -la"
~/.bashrc so they persist after restarting Termux.50. cron / termux-job-scheduler — Schedule Tasks
Automate scripts to run at specific times.
pkg install cronie
crond
crontab -e # open cron editor
# Example: run backup.sh every day at 8am
# 0 8 * * * bash ~/backup.sh
// 07 — Common Errors and Fixes
Error: "Unable to locate package"
Run pkg update first, then try installing again. Your package list may be outdated.
Error: "Permission denied"
Either run termux-setup-storage if accessing /sdcard, or use chmod +x filename to make a script executable.
Error: "bash: command not found"
The tool is not installed. Use pkg install toolname or pkg search toolname to find it.
Error: "Storage permission not granted"
Go to Android Settings → Apps → Termux → Permissions → Storage → Allow.
Termux is slow or freezes
Android may be killing background processes. Go to battery settings and disable battery optimization for Termux.
// 08 — Pro Tips for Termux Beginners
Ctrl + C to stop any running command or process instantly.man commandname (after pkg install man) to read the full manual for any command.// 09 — Termux vs Traditional Linux Terminal
| Feature | Termux (Android) | Linux Desktop Terminal |
|---|---|---|
| Root required | ❌ No | ⚠️ For some tasks |
| Package manager | pkg / apt | apt / yum / pacman |
| Home directory | /data/data/com.termux/files/home | /home/username |
| Storage access | /sdcard (after setup) | /home, /media, etc. |
| Python support | ✅ Full | ✅ Full |
| SSH server | ✅ Yes | ✅ Yes |
| Portability | 📱 Runs on phone | 💻 Needs computer |
| System calls | ⚠️ Some limitations | ✅ Full access |
// FAQ — Frequently Asked Questions
termux-change-repo and select a different mirror closer to your region. This usually fixes both speed and update errors.python -m http.server 8080 to start a simple local web server. You can also install Apache or Nginx through pkg for a full web server setup — all without root.// 10 — Conclusion
You've now got a solid foundation of 50 essential Termux commands covering navigation, file management, package installation, networking, and scripting. These Termux commands are the toolkit that every beginner needs to start their journey into Linux and Android development. The best way to actually learn them is to open Termux right now and start typing — practice is everything.
Remember: every expert was once a beginner who didn't give up. Termux is a remarkable tool that turns your Android phone into a powerful Linux workstation, and you now have the commands to unlock that power. Keep exploring, keep experimenting, and check out hydratermux.blogspot.com for more in-depth tutorials on Python in Termux, Git workflows, SSH setup, and much more.
ps aux | grep python or ls -la | grep .sh. Chaining commands is where the real power of the terminal begins!