If you are new to command-line interfaces and unsure about what to do or which command to use for a specific task then this blog post is here to help you. In this post, we’ll share a list of the top 20 Termux commands that you must know before you can start using Termux effectively.

Table of Contents
What is Termux?
Termux is a terminal application for Android devices that lets you run Linux commands and tools on your phone. You can use it for programming, ethical hacking, or almost anything you would do on a Linux computer. The best thing is that Termux doesn’t need root access, making it easy and powerful for Android users.
With Termux, you can:
- Manage files and directories.
- Run programming languages like Python, Node.js, and Ruby.
- Install and use Linux tools.
- Access remote servers using SSH.
- Perform ethical hacking and penetration testing.
Why Learn Termux Commands?
As we know, Termux is a command line interface application, which means you need to run commands to perform any task. Learning Termux commands will help you to:
- Automate repetitive tasks.
- Manage files and storage easily.
- Install and use tools for coding, hacking, or network analysis.
- Troubleshoot and maintain your system.
Top 20 Termux Commands

If you are a beginner, then learning the Termux commands will help you to use Termux easily and efficiently. Below is a list of the top 20 Termux commands to start your Linux journey.
1. Update and Upgrade
The following command will update and upgrade the Termux-installed packages to their latest version.
apt update && apt upgrade -y
2. Install Packages
Use the following command to install any tools or packages in Termux.
pkg install <package-name>
For example, to install python, run:
pkg install python
3. View Installed Packages
To see the list of all installed packages, use:
pkg list-installed
4. Uninstall Packages
If you want to remove/delete a package or tool then run:
pkg uninstall <package-name>
5. Clear the Terminal
To clear the terminal screen and make it look clean:
clear
6. Navigating Directories
List files in the current directory:
ls
Move to another directory:
cd <directory-name>
Go back to the previous directory:
cd ..
Go back to the home directory:
cd
7. Create Files and Folders
To create a new file:
touch <file-name>
To create a new folder (Directory):
mkdir <folder-name>
8. Delete Files and Folders
To delete a file:
rm <file-name>
To delete a folder (Directory):
rm -rf <folder-name>
9. Edit Files
Use the nano
editor to edit text files:
nano <file-name>
After editing, press (CTRL +
O) then press Enter to save and (CTRL + X
) to exit.
10. View File Content
If you want to see the contents of a file then use command:
cat <file-name>
11. Download Files
To download files directly from the internet:
wget <file-url>
This is great for downloading scripts or tools.
12. Check Disk Space
Find out how much storage is left on your device:
df -h
13. View Running Processes
To see what processes are currently running:
top
This shows real-time information about CPU and memory usage.
14. Kill a Process
If you want to stop/kill a process, you can stop it using its process ID (PID):
kill <pid>
15. Search for Files
To locate a specific file:
find <directory-path> -name <file-name>
16. Access Android Storage
To allow Termux to access your device internal storage:
termux-setup-storage
After granting permission, your storage will be accessible in the storage
folder.
17. Check Network Connectivity
To check if a website is reachable or measure its response time:
ping <website-url>
For example:
ping google.com
18. View Network Information
To see details about your device’s network interfaces:
ifconfig
19. SSH into a Server
SSH lets you remotely access other computers or servers. To connect, use:
ssh username@<server-ip>
20. Use Git for Version Control
Install Git:
pkg install git -y
Clone a repository:
git clone <repository-url>
Git is helpful for downloading and managing code repositories.
These are the top 20 Termux commands that every beginner should need to know.
What These Commands Do
These commands will help you to:
- Manage files and folders: Navigate, create, delete, and edit files and folders easily.
- Install and manage tools: Install and use powerful linux tools and packages.
- Access and control your system: Monitor processes, check storage, and troubleshoot issues.
- Interact with networks: Test connectivity, download files, or use SSH to manage remote servers.
By learning these commands, you can use Termux like a pro, whether for development, ethical hacking, or everyday Linux tasks.
Bonus Tip: Run Scripts

You can create your own scripts in Termux by using programming languages like Python, Bash, Java, and more. Here is an example of creating and running a script in Termux.
Example of creating a Bash script file:
nano myscript.sh
Add your codes to the file then save it and exit. For example, here is a ninja animated fun code:
#!/bin/bash
clear; echo "-------------------------------------------------"; echo " 🥷 Welcome to the System Ninja Tool! 🥷"; echo "-------------------------------------------------"; sleep 1; echo "🔍 Checking your system health..."; sleep 1; echo "-------------------------------------------------"; echo "🖥️ CPU Usage: $(top -bn1 | grep 'Cpu(s)' | awk '{print $2 + $4"%"}')"; echo "-------------------------------------------------"; echo "🧠 Memory Usage: $(free -h | awk '/^Mem/ {print $3 " / " $2}')"; echo "-------------------------------------------------"; echo "💾 Disk Space:"; df -h | awk '/^\/dev/ {print $5 " used on " $1}'; echo "-------------------------------------------------"; echo "📜 Fetching a motivational quote..."; sleep 1; echo "$(wget -qO- https://api.quotable.io/random | grep -Po '(?<="content":")[^"]*')"; echo "-------------------------------------------------"; echo "🥷 Here's your Ninja:"; sleep 1; case $((RANDOM % 3)) in 0) echo "⠀⣠⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤"; echo "⠀⠙⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛";; 1) echo " 🥷 Ninja in the shadows! 🥷";; 2) echo " 🥷 Silent but Deadly 🥷";; esac; echo "-------------------------------------------------"; echo "Goodbye! Stay productive and stay ninja! 🥷"
Press (CTRL + O) and press enter then press (CTRL + X) to save and exit.
Before running the script, you need to give it execute permission:
chmod +x myscript.sh
Now run the script:
./myscript.sh
Like this way, you can create your own scripts in any programming language and run them in Termux.
Conclusion
Termux is a hidden application for Android devices that unlocks the true potential of Android devices by providing a platform to use Linux tools and packages. In this post we have provided the top 20 Termux commands, which will help you to manage files, install tools, and more. Regularly practicing these commands can improve your Linux knowledge, and you can complete tasks faster and use Termux more efficiently.