Termux Commands
Note: Termux is a terminal application for android devices. You can find it at Play Store
Basic Commands
pkg update Updates the package list
pkg upgrade Upgrades installed packages
pkg install [package_name] Installs a new package (e.g., pkg install python)
termux-setup-storage Requests permission for storage access (to access your files)
termux-wake-lock Prevents the device from sleeping while Termux is running.
termux-wake-unlock Releases the wake lock set by termux-wake-lock.
File Management
ls Lists files and directories in the current directory.
cd [directory_path] Changes the directory (e.g., cd /sdcard).
mkdir [directory_name] Creates a new directory.
rm [file_name] Deletes a file.
cp [source] [destination] Copies a file from one location to another.
tar -xzvf [archive_name.tar.gz] Extracts a compressed archive.
zip -r [archive_name.zip] [directory_name] Creates a ZIP archive of a directory.
unzip [archive_name.zip] Extracts a ZIP archive.
Text Editing and Processing
nano [file_name] Opens the Nano text editor.
cat [file_name] Displays the content of a file.
grep [word] [file_name] Searches for a specific word in a file.
join [file1] [file2] Joins lines of two files on a common field.
less [file_name] Views the content of a file one screen at a time.
more [file_name] An older pager program similar to less.
Network Tools
ping [website_address] Pings a website.
curl [website_address] Retrieves the content of a website.
wget [file_link] Downloads a file from the internet.
ifconfig Configures or displays network interface parameters for a network interface controller.
iptables -L Lists the set of rules used by the iptables firewall.
host [domain] Performs DNS lookups
Special Packages and Tools
git Version control system.
python Installs the Python programming language.
ssh Used for secure shell connections.
postgresql Installs PostgreSQL, an advanced open source database system.
nmap Network exploration tool and security/port scanner.
openssh Installs OpenSSH, a suite of secure networking utilities based on the SSH protocol.
r Installs R, a language and environment for statistical computing and graphics
Extended File Management Commands
touch [file_name] Creates a new empty file.
mv [source] [destination] Moves or renames a file or directory.
find [directory] -name [search_pattern] Searches for files or directories within a specified directory.
diff -r [directory1] [directory2] Compares files in two directories recursively.
tree [directory_name] Displays a tree representation of directory structure.
df -h Shows disk space usage of all mounted filesystems in a human-readable format.
fdisk -l Lists the partition tables for the specified devices and their partitions.
Advanced Text Processing
sed 's/[old_string]/[new_string]/g' [file_name] Replaces all occurrences of a string in a file.
awk '/[pattern]/ {action}' [file_name] Scans a file line by line and performs actions on lines that match a pattern.
tail -n [number] [file_name] Displays the last few lines of a file.
fold -w [width] [file_name] Wraps each input line to fit in specified width.
tac [file_name] Concatenate and print files in reverse.
sed -n [pattern]p [file_name] Prints only those lines that match the pattern.
awk 'BEGIN {action}' [file_name] Executes an action before reading the lines of a file.
System Information and Management
top Displays real-time system processes and resource usage.
df Shows disk space usage.
uptime Shows how long the system has been running.
who Shows who is logged on.
w Shows who is logged in and what they are doing.
last Shows a listing of last logged-in users.
Networking and Connectivity
nmap [ip_address/domain] Scans for open ports on a network host.
ssh [user]@[host] Connects to a remote host via SSH.
scp [source] [user]@[host]:[destination] Securely copies files between hosts over SSH.
Package Management and Customization
pkg list-installed Lists all installed packages.
pkg search [package_name] Searches for a package in the repositories.
termux-change-repo Allows changing the repositories for updating and installing packages.
Development Tools
git clone [repository_url] Clones a Git repository.
python -m http.server Starts a simple HTTP server in the current directory (useful for testing web pages).
gem install [gem_name] Installs Ruby gems.
make Builds and compiles a project from source code.
gradle build Builds a project using Gradle, often used for Java and Android projects.
vim [file] Edits files using Vim, a powerful text editor.
nano [file] Edits files in Nano, a simpler text editor.
Development Tools
git clone [repository_url] Clones a Git repository.
python -m http.server Starts a simple HTTP server in the current directory (useful for testing web pages).
gem install [gem_name] Installs Ruby gems.
make Builds and compiles a project from source code.
gradle build Builds a project using Gradle, often used for Java and Android projects.
vim [file] Edits files using Vim, a powerful text editor.
nano [file] Edits files in Nano, a simpler text editor.