50 Essential Termux Commands Every Beginner Must Know (2026)



Termux · Linux · Android

50 Essential Termux Commands Every Beginner Must Know (2026)

🆓 Free 🤖 No Root Required 📱 Android ✅ Tested 2026

// 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!

This entire guide requires no root access. All 50 commands work on a standard Termux installation on any Android device.

// 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.

bashcopy
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.

bashcopy
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.

bashcopy
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.

bashcopy
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.

bashcopy
termux-setup-storage
💡
Tip: Run this once after installing Termux. A popup will ask for permission — tap Allow.

6. whoami — Check Current User

bashcopy
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.

bashcopy
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.

bashcopy
history
history | tail -20   # last 20 commands

9. exit — Close Termux Session

bashcopy
exit

10. help — Get Command Help

For any command, add --help at the end to see its usage options.

bashcopy
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.

bashcopy
mkdir myfolder
mkdir -p projects/python/scripts

12. touch — Create an Empty File

bashcopy
touch notes.txt
touch script.py

13. cp — Copy Files

bashcopy
cp notes.txt backup.txt
cp -r myfolder/ myfolder_backup/   # copy a whole folder

14. mv — Move or Rename Files

bashcopy
mv notes.txt documents/notes.txt   # move
mv oldname.txt newname.txt          # rename

15. rm — Remove Files

bashcopy
rm notes.txt
rm -rf myfolder/    # delete folder and all contents
⚠️
Warning: rm -rf is permanent. There is no Recycle Bin in Termux. Double-check before you run it.

16. cat — Read a File

bashcopy
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.

bashcopy
less largefile.txt

18. grep — Search Inside Files

Searches for a specific word or pattern inside a file.

bashcopy
grep "error" logs.txt
grep -i "python" notes.txt    # -i = case insensitive

19. find — Search for Files

bashcopy
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.

bashcopy
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.

bashcopy
pkg update

22. pkg upgrade — Upgrade Installed Packages

bashcopy
pkg upgrade
💡
Tip: Run pkg update && pkg upgrade together regularly to keep your environment up to date.

23. pkg install — Install a Package

bashcopy
pkg install python
pkg install git
pkg install curl wget nano

24. pkg uninstall — Remove a Package

bashcopy
pkg uninstall nano

25. pkg search — Search for a Package

bashcopy
pkg search python
pkg search node

26. pkg list-installed — See Installed Packages

bashcopy
pkg list-installed

27. pip install — Install Python Libraries

Once Python is installed, use pip to install Python packages.

bashcopy
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.

bashcopy
pkg install nodejs
npm install -g express

29. dpkg -l — List All Debian Packages

bashcopy
dpkg -l | grep python

30. apt — Alternative Package Manager

apt is also available in Termux and works similarly to pkg.

bashcopy
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

bashcopy
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.

bashcopy
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

bashcopy
wget https://example.com/file.zip
wget -c https://example.com/largefile.zip   # resume download

34. ifconfig / ip addr — View Network Interfaces

bashcopy
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.

bashcopy
pkg install nmap
nmap 192.168.1.1          # scan your router
nmap -sP 192.168.1.0/24  # discover devices on your network
⚠️
Warning: Only scan networks you own or have permission to test. Scanning others' networks without permission is illegal.

36. ssh — Secure Shell Connection

Connect to a remote server or another device securely.

bashcopy
pkg install openssh
ssh user@192.168.1.100
ssh user@yourserver.com -p 22

37. scp — Securely Copy Files Over SSH

bashcopy
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

bashcopy
pkg install net-tools
netstat -tuln   # show open ports and listening services

39. traceroute — Trace Network Path

bashcopy
pkg install traceroute
traceroute google.com

40. git clone — Clone a Repository

Download any GitHub project to your phone in seconds.

bashcopy
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.

bashcopy
pkg install nano
nano myscript.sh

Inside nano: Ctrl+O to save, Ctrl+X to exit.

42. vim — Advanced Text Editor

bashcopy
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

bashcopy
python --version
python myscript.py
python3 myscript.py

44. bash — Run Shell Scripts

bashcopy
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.

bashcopy
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

bashcopy
top
pkg install htop
htop

47. ps — List Running Processes

bashcopy
ps aux
ps aux | grep python   # find Python processes

48. kill — Stop a Process

bashcopy
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.

bashcopy
alias update="pkg update && pkg upgrade"
alias ll="ls -la"
💡
Tip: Add your aliases to ~/.bashrc so they persist after restarting Termux.

50. cron / termux-job-scheduler — Schedule Tasks

Automate scripts to run at specific times.

bashcopy
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

01

Error: "Unable to locate package"

Run pkg update first, then try installing again. Your package list may be outdated.

02

Error: "Permission denied"

Either run termux-setup-storage if accessing /sdcard, or use chmod +x filename to make a script executable.

03

Error: "bash: command not found"

The tool is not installed. Use pkg install toolname or pkg search toolname to find it.

04

Error: "Storage permission not granted"

Go to Android Settings → Apps → Termux → Permissions → Storage → Allow.

05

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

💡
Tip 1: Use Tab key for auto-completion. Type the first few letters of a command or filename and press Tab — Termux will complete it for you.
💡
Tip 2: Use the Up arrow key to cycle through previous commands instead of retyping them.
💡
Tip 3: You can open multiple Termux sessions by swiping from the left edge of the screen. Great for running multiple tasks at once.
💡
Tip 4: Use Ctrl + C to stop any running command or process instantly.
💡
Tip 5: Install Termux from F-Droid, not the Play Store. The Play Store version is outdated and no longer maintained.
💡
Tip 6: Use 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 managerpkg / aptapt / 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

Is Termux safe to use on my Android phone?
Yes, Termux is completely safe for your device. It runs as a regular Android app without root privileges. It cannot access system files or other apps without your permission. Just avoid running unknown scripts from the internet without reviewing them first.
Do I need to root my phone to use Termux?
No. All 50 commands in this guide work on a non-rooted Android device. Root is only needed for very advanced tasks like modifying system partitions, which we do not cover here.
Where should I install Termux from?
Always install Termux from F-Droid (f-droid.org). The Google Play Store version has not been updated since 2020 and will have package errors. The F-Droid version is actively maintained.
Can I learn Linux properly using only Termux?
Absolutely. Termux runs a real bash shell with real Linux commands. Everything you learn here — navigation, file management, scripting, networking, package management — transfers directly to any Linux system. It's an excellent learning environment.
Why is my pkg update failing or very slow?
Termux uses mirrors to distribute packages. If your mirror is slow or unreliable, run termux-change-repo and select a different mirror closer to your region. This usually fixes both speed and update errors.
Can I run a web server in Termux?
Yes! Install Python and run 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.

Next Steps: Try combining commands with pipes — for example, ps aux | grep python or ls -la | grep .sh. Chaining commands is where the real power of the terminal begins!

Rixon Xavier

Founder — HYDRA TERMUX

Cybersecurity educator and Termux enthusiast. Creating free tutorials to help Android users learn Linux and ethical cybersecurity since 2023.

⚠️ Disclaimer: This tutorial is for educational purposes only. Always practice on systems you own or have explicit permission to test. HYDRA TERMUX does not support illegal activity of any kind.
Next Post Previous Post
No Comments Yet
Add Comment
comment url