Did you know your Android phone can become a mini computer? With Termux, you can use powerful Linux tools right from your phone! But if you’re new, it can look confusing. So don’t worry — I made this Termux Command Cheat Sheet just for you.
In this article, I will give you a full list of Termux commands from beginner to advanced. I’ll explain everything in a super simple way, so even a complete beginner can understand and start using Termux like a pro.

Let’s start learning, Termux commands cheat sheet:
What is Termux?
Termux is a free Android app that gives you a terminal, just like a computer. You can type commands and do things like install tools, run scripts, write code, or even learn ethical hacking.
You don’t need root to use Termux. Just download the app, and you’re ready to go.
How to Install Termux
- Go to F-Droid and download the latest Termux APK.
- Install the app on your phone.
- Open Termux and type this command:
apt update && apt upgrade -yThis will update Termux and make it ready to use.
Why You Need This Cheat Sheet
When you open Termux, it shows a black screen and waits for your commands. That’s why it’s important to learn the commands. This cheat sheet will help you remember all the important Termux commands.
Termux Command Cheat Sheet
Let’s break the commands into sections for easier learning.
Basic Termux Commands cheat sheet for beginners
These are the first commands you should learn.
- pwd : Shows the folder you are in.
- ls : Lists files and folders.
- cd foldername : Enter a folder.
- cd .. : Go back one folder.
- clear : Clears the screen.
- exit : Closes Termux.
- mkdir myfolder : Make a new folder.
- touch file.txt : Make a new file.
- cat file.txt : Show what’s inside a file.
- rm file.txt : Delete a file.
- rm -rf folder : Delete a folder and everything inside.
- whoami : Shows your username.
- date : Shows date and time.
- echo Hello : Print a message.
Package Management Commands
Use these commands to install, remove, or update tools in Termux.
- pkg update : Updates all packages.
- pkg upgrade : Upgrades installed tools.
- pkg install toolname : Install a new tool (e.g.,
pkg install python). - pkg uninstall toolname : Remove a tool.
- apt update : Similar to pkg update.
- apt upgrade : Similar to pkg upgrade.
- apt install toolname : Install tools with apt.
- pkg list-all : List all available tools.
File and Folder Commands
These commands help you move, copy, and manage your files.
- mv file1 file2 : Rename or move a file.
- cp file1 file2 : Copy a file.
- cp -r folder1 folder2 : Copy a folder.
- ls -a : List hidden files too.
- ls -l : Shows file details.
- stat file.txt : Show file info.
Storage Access Commands
To access your phone files from Termux, use these:
- termux-setup-storage : Gives Termux access to storage.
- cd /sdcard : Go to your phone’s storage.
- ls /sdcard : See all phone files.
- cp file /sdcard/ : Copy a file to your storage.
Internet and Network Commands
These commands help you use internet-related tools.
- ping google.com : Check internet.
- wget link : Download something from a link.
- curl link : Also downloads content.
- ip a : Show IP address.
- nmap website.com : Scan open ports (after installing nmap).
Programming in Termux
You can write and run code in Termux easily.
- python filename.py : Run Python file.
- bash script.sh : Run shell script.
- node file.js : Run JavaScript file.
- nano file.txt : Open file editor.
- chmod +x file.sh : Make script file executable.
Git and GitHub Commands
Use GitHub tools right in Termux.
- pkg install git : Install git tool.
- git clone url : Download any tool from GitHub.
- cd folder : Go to the downloaded tool.
- bash file.sh : Run a script inside the folder.
- ls : See what’s inside.
Ethical Hacking Tools in Termux
Only use these for legal learning and testing!
- pkg install nmap : Network scanner.
- pkg install openssh : For SSH and SQL.
- pkg install whois : See domain info.
- source <(curl -fsSL https://kutt.it/msf) : Install Metasploit.
- pkg install tor : Anonymous browsing.
- tor : Start TOR service.
- nmap -sV website.com : Deep port scan.
Cool Termux Commands
These are fun commands to try in Termux.
- cmatrix : Shows falling green hacker text.
- figlet Hello : Big ASCII text.
- toilet Hello : Fancy colorful text.
- neofetch : Shows system info in a stylish way.
- sl : Shows a train running in terminal.
- fortune : Gives funny quotes.
- cowsay Hello : Cow says your message.
- asciiquarium : Shows fish aquarium in terminal.
- lolcat : Adds rainbow colors to text.
Useful Termux Shortcuts
These will help you use Termux faster.
- CTRL + C : Stop running command.
- CTRL + D : Exit terminal.
- CTRL + L : Clear screen.
- TAB : Auto complete.
- UP Arrow : Shows previous commands.
- && : Run multiple commands.
- history : Show past commands.
Example:
apt update && apt upgradeProgramming & Python Commands in Termux
If you love coding or want to learn programming, Termux can help you do that easily. You can write and run code in different languages like Python, Bash, or JavaScript (Node.js) right from your Android phone — just like you do on a computer.
Let me show you some easy commands to use for programming in Termux.
Python Commands
To run Python programs, you first need to install Python in Termux.
Step 1: Install Python
pkg install python -yThis command installs the latest version of Python in Termux.
Step 2: Check Python Version
python --versionThis shows which version of Python is installed.
Step 3: Create a Python Program
Create python or any other file by using command like this:
nano termux-python.pyStep 4: Write python program in Termux
This is a simple python code that you can copy and paste in Termux to test python programming:
# Simple Python Script
import datetime
print(" Hello! Welcome to the Python fun script.")
# Ask for user's name
name = input("What is your name? ")
print(f"Hi {name}, nice to meet you!")
# Do a simple addition
print("Let's add two numbers.")
num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
total = num1 + num2
print(f"The total of {num1} + {num2} is {total}")
# Check if a number is even or odd
print("Now let's check if a number is even or odd.")
num = int(input("Enter a number: "))
if num % 2 == 0:
print(f"{num} is an even number.")
else:
print(f"{num} is an odd number.")
# Show date and time
now = datetime.datetime.now()
print("The current date and time is:", now.strftime("%Y-%m-%d %H:%M:%S"))
# Say goodbye
print(f"Thank you for using this script, {name}! Have a great day! ")Step 5: Run python program in Termux
python termux-python.pyThis command runs a Python file in Termux.
Bash Script Commands
You can also write shell scripts (small programs) and run them in Termux.
1. Make a Bash Script File
nano myscript.shThis opens a file where you can write your bash code.
Example inside file:
#!/bin/bash
echo " Hello! Welcome to this fun bash script."
sleep 1
echo "What's your name?"
read name
echo "Hi $name! Nice to meet you!"
sleep 1
echo " Today's date is: $(date)"
sleep 1
echo " Now enter a number:"
read number
if [ $((number % 2)) -eq 0 ]; then
echo " $number is an Even number."
else
echo " $number is an Odd number."
fi
sleep 1
echo " Thanks for using this script, $name! Have a great day!"2. Give Permission to Run
chmod +x myscript.sh3. Run the Script
./myscript.shMore Programming Tools You Can Install in Termux
| Tool | Install Command | What It Does |
|---|---|---|
| Python | pkg install python | Runs Python scripts |
| Node.js | pkg install nodejs | Runs JavaScript files |
| Ruby | pkg install ruby | Runs Ruby programs |
| Nano | pkg install nano | Opens file editor to write code |
| Git | pkg install git | Downloads tools from GitHub |
Download Termux Commands Cheat Sheet PDF
I have also made a PDF file that includes all the Termux commands from this cheat sheet. You can download it for free and save it on your phone. It’s great if you want to use it offline and don’t want to forget the commands.
Download Termux Command Cheat Sheet PDF
Final Words
This article gives you a full Termux command cheat sheet from basic to advanced. These commands will help you manage files, install tools, run programs, and even try ethical hacking — all from your Android phone!
Whether you’re a beginner or someone who wants to learn cool stuff with Termux, this cheat sheet will help you start easily.








