1. Basic Termux Commands
pkg update– Update package listspkg upgrade– Upgrade all installed packagespkg install <package_name>– Install a packagepkg list-installed– List all installed packagespkg search <package_name>– Search for a packagepkg uninstall <package_name>– Uninstall a packageexit– Close Termuxclear– Clear the terminal screentermux-reload-settings– Reload Termux settingstermux-info– Show system information
2. File and Directory Management
ls– List files in the current directoryls -la– List all files, including hidden onescd <directory>– Change directorycd ..– Move to the previous directorymkdir <directory>– Create a new directoryrm <file>– Delete a filerm -r <directory>– Delete a directory and its contentsmv <source> <destination>– Move or rename a filecp <source> <destination>– Copy a filefind <directory> -name <filename>– Search for a file
3. Text Editing & Viewing
nano <filename>– Edit a file with Nanovim <filename>– Edit a file with Vimcat <filename>– Display file contentsless <filename>– View large text fileshead -n 10 <filename>– Show the first 10 lines of a filetail -n 10 <filename>– Show the last 10 lines of a file
4. Network Commands
ping google.com– Test internet connectivitycurl <URL>– Fetch a webpagewget <URL>– Download a filewhois <domain>– Get domain informationnslookup <domain>– Get DNS detailstraceroute <host>– Trace the path to a hostnetstat -tulnp– Show network connectionsifconfig– Display network informationip a– Show IP addressesssh user@host– Connect to a remote server
5. Storage Management
termux-setup-storage– Enable storage accessdf -h– Check available disk spacedu -sh <directory>– Check directory sizerm -rf <directory>– Delete files permanently
6. Process Management
ps aux– List running processestop– Display running processes dynamicallykill <PID>– Terminate a processpkill <name>– Kill a process by namehtop– Interactive process viewer
7. Scripting & Automation
chmod +x <script.sh>– Make a script executable./script.sh– Run a scriptbash <script.sh>– Run a script with Bashsh <script.sh>– Run a script with SH
8. Ethical Hacking & Security
nmap -sV <IP>– Scan open portssqlmap -u <URL>– Test for SQL Injectionhydra -l user -P passlist.txt <IP> ssh– Brute-force SSH loginmetasploit– Start Metasploit frameworkwireshark– Capture network packetsaircrack-ng– Crack WiFi passwordsjohn <password_file>– Crack passwordshashcat -m 0 -a 3 hash.txt ?a?a?a– Bruteforce hash
9. Programming & Development
python3– Open Python interpreterpython3 <script.py>– Run a Python scriptpip install <package>– Install a Python packagenode– Open Node.js interpreternpm install <package>– Install an NPM packagegcc <file.c> -o output– Compile a C programjavac <file.java>– Compile a Java programjava <class_name>– Run a Java programphp <file.php>– Run a PHP script
10. Termux API (Requires Termux API Package)
termux-battery-status– Show battery infotermux-camera-info– Show camera detailstermux-camera-photo -c 0 -o photo.jpg– Take a phototermux-vibrate -d 1000– Vibrate for 1 secondtermux-clipboard-get– Get clipboard texttermux-clipboard-set "Hello"– Set clipboard texttermux-location– Get current GPS location
11. System Monitoring
uptime– Show system uptimeuname -a– Show system detailsdate– Show current date and timecal– Show calendarwatch -n 1 <command>– Run a command every secondlogcat– View system logs
12. Package Management & Repositories
apt update– Update package listsapt upgrade– Upgrade installed packagesapt list– List available packagesapt show <package>– Show package detailsdpkg -i <package.deb>– Install a Debian packagedpkg -r <package>– Remove a package
13. Compression & Archiving
zip -r archive.zip folder/– Create a ZIP archiveunzip archive.zip– Extract a ZIP filetar -czvf archive.tar.gz folder/– Create a tar.gz archivetar -xzvf archive.tar.gz– Extract a tar.gz archive
14. Database Management
sqlite3 <database.db>– Open an SQLite databasemysql -u root -p– Open MySQL consolepsql -U user -d database– Connect to PostgreSQL
15. Miscellaneous
fortune– Display a random quotecowsay "Hello!"– Print a message with ASCII artfiglet "Termux"– Print large textlolcat file.txt– Show colorful texttoilet -f big Hello– Stylish ASCII texttermux-toast "Hello, World!"– Display a pop-up messagesl– Watch a steam locomotive animationcmatrix– Show a Matrix-like effect
Bonus: One-liner Scripts
find . -type f -exec chmod 644 {} \;– Fix file permissionsfind . -type d -exec chmod 755 {} \;– Fix directory permissionspython3 -m http.server 8080– Start a local web server
Post a Comment