Certainly! Here’s a list of more useful commands and tools you can use in Termux, categorized by their purpose.
System Information & Management
- View System Information:
uname -a
- Displays detailed system information.
- Check Disk Usage:
df -h
- Shows the disk space usage.
- Check Memory Usage:
free -h
- Displays memory usage information.
- List Installed Packages:
pkg list-installed
- Lists all installed packages in Termux.
- Update Packages:
pkg update
- Updates the list of available packages and their versions.
- Upgrade All Packages:
pkg upgrade
- Upgrades all installed packages to their latest versions.
- Install a Specific Package:
pkg install <package_name>
- Installs a package, replacing
<package_name>
with the actual package name.
File Management
- List Files in Directory:
ls -la
- Lists all files and directories with detailed information.
- Copy Files:
cp <source> <destination>
- Copies a file from the source to the destination.
- Move or Rename Files:
mv <source> <destination>
- Moves or renames a file from the source to the destination.
- Create a Directory:
mkdir <directory_name>
- Creates a new directory.
- Remove a File:
rm <file_name>
- Removes a specified file.
- Remove a Directory and Its Contents:
rm -r <directory_name>
- Deletes a directory and all its contents.
- Change Permissions of a File:
chmod <permissions> <file_name>
- Changes the permissions of a file. For example,
chmod 755 file.sh
makes it executable.
Networking
- Check IP Address:
ip addr show
- Displays your device’s IP address and network information.
- Ping a Host:
ping <hostname_or_ip>
- Sends ICMP echo requests to test network connectivity to a host.
- Download a File:
curl -O <URL>
- Downloads a file from a URL.
- Check Open Ports:
netstat -tuln
- Lists all open ports and the services listening on them.
- Scan for Open Ports:
nmap <hostname_or_ip>
- Scans a target for open ports and services (requires
nmap
to be installed).
Text Editing
- Install Nano Editor:
pkg install nano
- Installs the Nano text editor.
- Open or Create a File with Nano:
nano <file_name>
- Opens an existing file or creates a new file for editing.
- Install Vim Editor:
pkg install vim
- Installs the Vim text editor.
- Open or Create a File with Vim:
vim <file_name>
- Opens an existing file or creates a new file for editing.
Programming & Scripting
- Install Python:
pkg install python
- Installs Python on Termux.
- Run a Python Script:
python <script_name.py>
- Executes a Python script.
- Install Git:
pkg install git
- Installs Git, a version control system.
- Clone a Git Repository:
git clone <repository_url>
- Clones a repository from GitHub or another Git platform.
- Install Node.js:
pkg install nodejs
- Installs Node.js, which allows you to run JavaScript code server-side.
- Run a Node.js Script:
node <script_name.js>
- Executes a Node.js script.
Utilities
- Install Wget:
pkg install wget
- Installs the Wget tool for downloading files from the web.
- Download a File with Wget:
wget <URL>
- Downloads a file from the specified URL.
- Install Htop (Interactive Process Viewer):
pkg install htop
- Installs
htop
, a tool for monitoring system processes.
- Run Htop:
htop
- Launches
htop
to view and manage running processes.
- Install OpenSSH (for SSH Access):
pkg install openssh
- Installs OpenSSH to allow SSH access to Termux.
- Start an SSH Server:
sshd
- Starts the SSH server, allowing you to SSH into your Termux session from another device.
Fun and Miscellaneous
- Install CMatrix (Matrix Screensaver):
pkg install cmatrix
- Installs CMatrix, which displays a cool Matrix-like screensaver.
- Run CMatrix:
cmatrix
- Starts the CMatrix screensaver.
- Install Figlet (ASCII Text Generator):
pkg install figlet
- Installs Figlet, a tool to create large ASCII text.
- Create ASCII Art Text:
figlet <your_text>
- Generates ASCII art from the text you provide.
Security Tools
- Install Metasploit:
pkg install unstable-repo
pkg install metasploit
- Installs the Metasploit framework for penetration testing.
- Start Metasploit:
msfconsole
- Launches the Metasploit console.
- Install Hydra (Password Cracking Tool):
pkg install hydra
- Installs Hydra, a brute-force password cracking tool.
- Use Hydra to Brute-Force an SSH Login:
hydra -l <username> -P <password_list> ssh://<target_ip>
- Attempts to brute-force an SSH login using the specified username and password list.
Conclusion
These commands provide you with a broad range of functionalities in Termux, from basic system management to programming, networking, and ethical hacking. Termux is incredibly versatile, and learning to use these commands effectively will help you make the most out of this powerful tool on your Android device.