The Ultimate Termux Commands List for Android 2026
The Ultimate Termux Commands List for Android (2026)
Termux transforms your Android device into a powerful Linux environment without requiring root access. Whether you're a developer, security enthusiast, or just curious about command-line interfaces, this comprehensive termux commands list for Android will help you harness the full potential of your mobile device. From basic file operations to advanced networking tools, we've organized everything you need to know about Termux commands in one convenient reference.
What is Termux and Why Use It?
Termux running on Android with basic commands
Termux is a terminal emulator and Linux environment app that runs directly on your Android device without rooting. It provides a command-line interface similar to what you'd find on Linux or macOS systems, allowing you to run powerful tools directly from your pocket. With Termux, you can write Python scripts, manage servers, perform network diagnostics, and even run basic web servers—all from your smartphone or tablet.
Unlike other terminal apps that merely provide SSH access to remote servers, Termux creates a local Linux environment with its own file system and package manager. This means you can install and run thousands of Linux packages directly on your Android device, making it an invaluable tool for developers, system administrators, and tech enthusiasts on the go.
Ready to Start Using Termux?
Download the latest version from F-Droid for the best experience. The Google Play Store version is outdated and no longer maintained.
Download Termux from F-DroidGetting Started with Termux
Before diving into our termux commands list for Android, let's set up your environment properly. After installing Termux from F-Droid, follow these initial steps to ensure everything is up-to-date and working correctly.
Initial Termux setup with package updates
Essential First-Time Setup Commands
| Command | Description | Example |
| pkg update | Updates package lists | pkg update |
| pkg upgrade | Upgrades all installed packages | pkg upgrade |
| termux-setup-storage | Sets up access to device storage | termux-setup-storage |
| pkg install [package] | Installs a specific package | pkg install python |
After running these commands, your Termux environment will be ready for more advanced operations. Remember to run pkg update && pkg upgrade regularly to keep your packages current and secure.
Basic Termux Commands Every User Should Know
Let's start with the fundamental commands that form the backbone of any termux commands list for Android. These basic operations will help you navigate and manage your Termux environment efficiently.
Basic file navigation and system commands in Termux
Navigation and File Management
- ls - List directory contents (try ls -la for detailed view)
- cd [directory] - Change directory (cd ~ returns to home)
- pwd - Print working directory (shows current location)
- mkdir [name] - Create a new directory
- touch [filename] - Create a new empty file
- cp [source] [destination] - Copy files or directories
- mv [source] [destination] - Move or rename files
- rm [file] - Remove files (use rm -r for directories)
Text Viewing and Editing
- cat [file] - Display file contents
- more [file] - View file contents one screen at a time
- nano [file] - Simple text editor (beginner-friendly)
- vim [file] - Advanced text editor (steeper learning curve)
- grep [pattern] [file] - Search for patterns in files
System Information
- uname -a - Display system information
- df -h - Show disk usage in human-readable format
- free -h - Display memory usage
- top - View running processes and system resources
- ps - List running processes
Master the Basics First
Practice these fundamental commands until they become second nature. They form the foundation for everything else you'll do in Termux.
Continue to Package ManagementPackage Management in Termux
One of Termux's most powerful features is its package management system, which allows you to install thousands of Linux tools and applications. Understanding how to manage packages is essential for expanding Termux's capabilities.
Package management operations in Termux
Essential Package Commands
| Command | Description | Example |
| pkg search [keyword] | Search for packages by keyword | pkg search python |
| pkg install [package] | Install a specific package | pkg install git |
| pkg uninstall [package] | Remove an installed package | pkg uninstall nano |
| pkg list-installed | List all installed packages | pkg list-installed |
| pkg list-all | List all available packages | pkg list-all |
| pkg show [package] | Show detailed information about a package | pkg show python |
Additional Repositories
Expand your available packages by adding extra repositories:
- pkg install x11-repo - X11 packages for GUI applications
- pkg install game-repo - Games and entertainment
- pkg install science-repo - Scientific tools and libraries
- pkg install unstable-repo - Cutting-edge packages (may be unstable)
- pkg install root-repo - Tools that work better with root access
Pro Tip: Always run pkg update after adding a new repository to refresh your package lists.
Networking Tools and Commands
Termux includes powerful networking capabilities that allow you to analyze, troubleshoot, and interact with networks directly from your Android device. These commands are particularly useful for network administrators and security professionals.
Network diagnostics in Termux
Network Diagnostic Commands
- ping [host] - Test connectivity to a host
- ip addr - Show network interfaces and addresses
- netstat - Display network connections (install with pkg install net-tools)
- traceroute [host] - Trace the route to a host (install with pkg install traceroute)
- dig [domain] - DNS lookup utility (install with pkg install dnsutils)
- whois [domain] - Domain information lookup (install with pkg install whois)
Advanced Networking Tools
Install these powerful networking tools to expand your capabilities:
Nmap
Network scanning and security auditing:
pkg install nmap nmap -sV [target]
Wireshark
Network protocol analyzer (requires root):
pkg install root-repo pkg install tshark tshark -i [interface]
Remote Connectivity
- ssh [user]@[host] - Connect to remote servers (pkg install openssh)
- scp [file] [user]@[host]:[path] - Securely copy files to remote servers
- wget [url] - Download files from the web (pkg install wget)
- curl [url] - Transfer data from or to a server (pkg install curl)
Enhance Your Networking Toolkit
Install these essential networking tools to transform your Android device into a portable network diagnostics station.
Install Network Tools NowDevelopment and Programming in Termux
Termux isn't just for system administration—it's also a powerful development environment. You can write, test, and run code in various programming languages directly on your Android device.
Python programming in Termux
Programming Languages
| Language | Installation Command | Basic Usage |
| Python | pkg install python | python script.py |
| Node.js | pkg install nodejs | node script.js |
| Ruby | pkg install ruby | ruby script.rb |
| PHP | pkg install php | php script.php |
| Go | pkg install golang | go run script.go |
| C/C++ | pkg install clang | clang file.c -o program |
Version Control with Git
Manage your code repositories directly from Termux:
- pkg install git - Install Git
- git clone [repository-url] - Clone a repository
- git pull - Update your local repository
- git add [file] - Stage changes
- git commit -m "[message]" - Commit changes
- git push - Push changes to remote repository
Git operations in Termux
Web Development
Set up a local web server for testing:
pkg install php mkdir www cd www echo '<?php phpinfo(); ?>' > index.php php -S localhost:8080
Now you can access your web server at http://localhost:8080 in your device's browser.
Process Management Commands
Managing processes effectively is crucial for maintaining system performance and running background tasks. Here are the essential process management commands for your termux commands list for Android.
Process monitoring and management in Termux
Viewing and Monitoring Processes
- ps - List running processes
- ps aux - Detailed list of all processes
- top - Dynamic real-time view of processes
- htop - Interactive process viewer (pkg install htop)
Process Control
- kill [PID] - Terminate a process by its ID
- killall [name] - Kill processes by name
- pkill [pattern] - Kill processes matching a pattern
- Ctrl+C - Interrupt the current foreground process
- Ctrl+Z - Suspend the current foreground process
Background Processing
- command & - Run a command in the background
- bg - Resume suspended jobs in the background
- fg - Bring background job to foreground
- jobs - List background jobs
- nohup command & - Run command immune to hangups
Pro Tip: For long-running processes, consider using tmux (pkg install tmux) to create persistent terminal sessions that continue running even if you close Termux.
Advanced Termux Usage and Customization
Take your Termux experience to the next level with these advanced techniques and customizations. These tips will help you create a more efficient and personalized environment.
Customized Termux interface with personalized prompt and color scheme
Customizing Your Shell
Install and configure alternative shells:
pkg install zsh chsh -s zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Keyboard Shortcuts and Extra Keys
Termux provides special keyboard shortcuts using the Volume buttons:
- Volume Up + E - Escape key
- Volume Up + T - Tab key
- Volume Up + 1-9 - F1-F9 keys
- Volume Up + 0 - F10 key
- Volume Up + W - Up arrow key
- Volume Up + A - Left arrow key
- Volume Up + S - Down arrow key
- Volume Up + D - Right arrow key
Add extra keyboard keys by creating or editing ~/.termux/termux.properties:
mkdir -p ~/.termux echo "extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]" > ~/.termux/termux.properties termux-reload-settings
Running Graphical Applications
Install a VNC server to run GUI applications:
pkg install x11-repo pkg install tigervnc vncserver -localhost # Connect with a VNC client using localhost:5901
Running a graphical application in Termux through VNC
Creating Aliases for Common Commands
Add these to your ~/.bashrc or ~/.zshrc file:
alias ll='ls -la' alias update='pkg update && pkg upgrade' alias py='python' alias cls='clear' alias ..='cd ..' alias ...='cd ../..'
Ready for Advanced Termux Usage?
Explore more advanced configurations and setups to customize your Termux experience.
Discover Advanced TechniquesTroubleshooting Common Termux Issues
Even experienced users encounter issues with Termux occasionally. Here are solutions to the most common problems you might face.
Troubleshooting common errors in Termux
Package Installation Failures
Problem: "Repository is under maintenance or down"
Solution: Try changing the mirror:
termux-change-repo
Select a different mirror and try again.
Permission Denied Errors
Problem: "Permission denied" when running scripts
Solution: Make the script executable:
chmod +x script.sh
Remember that Termux has limited access to system areas without root.
Storage Access Issues
Problem: Cannot access device storage
Solution: Run the storage setup command and grant permissions:
termux-setup-storage
If that doesn't work, check Android permissions for Termux in Settings.
Command Not Found Errors
Problem: "Command not found" for installed packages
Solution: Check your PATH variable:
echo $PATH
If needed, add the correct path to your .bashrc or .zshrc file.
Frequently Asked Questions
Is Termux safe to use on my Android phone?
Yes, Termux is safe to use. It runs in a sandboxed environment that prevents it from accessing sensitive system areas without explicit permissions. All commands run within Termux's own file system by default, not your Android system files. However, as with any tool that provides command-line access, you should be careful about which commands you run, especially if copied from untrusted sources.
Do I need to root my device to use Termux?
No, Termux is specifically designed to work without root access. Most commands and packages work perfectly fine on non-rooted devices. However, some advanced system operations and certain security tools may require root access to function fully. For basic to intermediate usage, including programming, web development, and most networking tools, root access is not necessary.
How do I install packages that aren't in the basic repository?
You can install packages from additional repositories by first adding those repositories to Termux. Common additional repositories include x11-repo, game-repo, and science-repo. Install them with commands like pkg install x11-repo, then run pkg update to refresh your package lists. For packages not available in any repository, you may need to compile them from source or use alternative installation methods like pip for Python packages or npm for Node.js packages.
Can I run Python scripts or host a web server with Termux?
Yes, Termux fully supports Python and web servers. Install Python with pkg install python, then run scripts with python script.py. For web servers, you can install Apache, Nginx, or use Python's built-in server with python -m http.server 8080. PHP's built-in server is also available with php -S localhost:8080. These servers are accessible from your device's browser at localhost:8080 or from other devices on the same network using your device's IP address.
How do I fix 'Permission denied' errors?
Permission denied errors usually occur when trying to execute scripts or access certain files. For scripts, make them executable with chmod +x script.sh. For storage access issues, run termux-setup-storage and grant the requested permissions. Remember that Termux has limited access to system areas without root. If you're trying to access or modify system files, you'll need root access, which requires a rooted device and additional setup.
Where can I find more termux commands for Android?
Beyond this termux commands list for Android, you can explore more commands by using the built-in help system. Try man [command] or [command] --help to learn about specific commands. The Termux wiki and GitHub repository are excellent resources for advanced usage. Additionally, most Linux command references apply to Termux since it uses standard Linux tools. For package-specific commands, check the documentation of those packages after installation.
Conclusion
Harnessing the full power of Termux on Android
This comprehensive termux commands list for Android has covered everything from basic operations to advanced techniques, giving you the tools to transform your Android device into a powerful command-line workstation. Termux bridges the gap between mobile convenience and desktop power, allowing you to perform complex tasks directly from your pocket.
Whether you're a developer writing code on the go, a system administrator managing servers remotely, or simply a tech enthusiast exploring the capabilities of your Android device, Termux offers an unparalleled level of functionality without requiring root access.
Remember to keep your Termux installation updated with regular pkg update && pkg upgrade commands, and don't hesitate to explore new packages and tools as your skills grow. The command line may seem intimidating at first, but with practice, it becomes an incredibly efficient and powerful way to interact with your device.
Ready to Master Termux?
Download Termux from F-Droid and start exploring the power of Linux on your Android device today.
Get Termux Now
Join the conversation