Termux is a powerful terminal emulator application for Android that provides a Linux command-line environment directly on mobile devices. It allows users to run Linux commands, install packages, manage files, use programming languages, host web servers, and practice cybersecurity tools without root access. Learning Termux commands is very important for beginners who want to explore Linux, networking, development, automation, and ethical hacking on Android.
Here’s what you can do with Termux commands:
- Manage files and folders.
- Install Linux packages.
- Run Python, PHP, and Node.js.
- Use networking and cybersecurity tools.
- Host local web servers.
- Learn Linux commands on Android.
- Run GitHub projects and scripts.
- Access remote servers using SSH.
- Practice automation and scripting.
Table of Contents
What is Termux?
Termux is a terminal emulator application for Android that provides a Linux command-line environment without requiring root access. It supports package management, programming languages, networking utilities, Linux tools, and many development packages on Android devices.
Install Termux on Android
Download and install the latest Termux application from GitHub or F-Droid.
Open the Termux application after installation.
Update all Termux packages:
pkg update && pkg upgrade -yPrepare storage permissions:
termux-setup-storageNow Termux is ready to use Linux commands on Android.
Termux Basic Commands
Termux basic commands are used to navigate directories, create and manage files, copy data, move between folders, and perform simple terminal tasks directly inside the Termux environment. It builds a strong foundation for working with Linux-style systems on Android and makes it easier to understand how the terminal works.
Show current directory:
pwdList files and folders:
lsList hidden files:
ls -aShow detailed file list:
ls -lMove into a folder:
cd foldernameGo back one directory:
cd ..Go to home directory:
cdClear terminal screen:
clearCreate a new folder:
mkdir myfolderCreate multiple folders:
mkdir folder1 folder2 folder3Create a new file:
touch file.txtDelete a file:
rm file.txtDelete a folder:
rm -rf foldernameCopy files:
cp file.txt /sdcard/Move files:
mv file.txt /sdcard/Rename files:
mv oldname.txt newname.txtShow file content:
cat file.txtEdit files using Nano:
nano file.txtTermux Package Management Commands
Termux package management commands handle installation, updating, upgrading, removal, and searching of Linux tools inside the Termux environment. It provides full control over software packages and keeps the system updated with the latest versions.
Update package list:
pkg updateUpgrade installed packages:
pkg upgradeInstall packages:
pkg install python -yInstall multiple packages:
pkg install git wget curl -yRemove packages:
pkg uninstall pythonSearch packages:
pkg search pythonShow installed packages:
pkg list-installedShow package information:
pkg show gitUse APT package manager:
apt updateInstall package using APT:
apt install pythonRemove package using APT:
apt remove pythonRemove unused packages:
apt autoremoveTermux Files & Directory Management Commands
Termux Files & Directory Management Commands are used to organize, search, create, and control files and folders inside the terminal. It allows easy handling of data, navigation through directories, and managing storage using simple terminal commands.
Find files:
find . -name file.txtSearch text inside files:
grep hello file.txtShow file information:
stat file.txtCheck file type:
file file.txtCheck folder size:
du -sh folderCheck disk usage:
df -hCreate symbolic link:
ln -s file.txt shortcut.txtChange file permission:
chmod +x script.shChange file ownership:
chown user:user file.txtTermux System & Process Management Commands
Termux system and process management commands help monitor device performance, control running programs, and manage system resources inside the terminal environment.
Show running processes:
topAdvanced process viewer:
htopShow process list:
ps auxStop process using PID:
kill 1234Stop process using name:
killall pythonShow memory usage:
free -hShow system uptime:
uptimeShow system information:
uname -aTermux Compression & Archiving Commands
Termux compression and archiving commands are used to compress files, extract archives, and manage storage efficiently by reducing file size and organizing data.
Create ZIP archive:
zip archive.zip file.txtExtract ZIP archive:
unzip archive.zipCreate TAR archive:
tar -cvf archive.tar folderExtract TAR archive:
tar -xvf archive.tarCompress file using gzip:
gzip file.txtExtract GZ file:
gunzip file.gzTermux Networking Commands
Termux networking commands are useful to test internet connections, check IP addresses, analyze domains, and gather network information from the terminal.
Check internet connection:
ping google.comInstall curl, wget and traceroute networking packages:
pkg install wget curl -yDownload files using wget:
wget https://example.com/file.zipDownload files using curl:
curl -O https://example.com/file.zipShow IP address:
curl ifconfig.meTrack network path:
traceroute google.comInstall dnsutils package:
pkg install dnsutilsPerform DNS lookup:
nslookup google.comCheck website headers:
curl -I https://example.comGet domain information:
whois google.comTermux Git & Development Commands
Termux Git & Development Commands allow downloading GitHub projects, managing code changes, installing programming tools, and running development environments in Termux. It provides a simple way to work with coding projects and version control systems from the terminal.
Install Git:
pkg install git -yClone GitHub repository:
git clone https://github.com/user/repoCheck repository status:
git statusPull latest updates:
git pullAdd files to commit:
git add .Commit changes:
git commit -m "update"Push changes:
git pushInstall Node.js:
pkg install nodejs -yRun JavaScript file:
node app.jsInstall PHP:
pkg install php -yStart local PHP server:
php -S localhost:8080Termux Permission & Users Commands
Termux Permission & Users Commands control file access, manage user information, and handle permission settings inside the terminal. It allows changing file permissions, checking current users, and controlling access to files and directories by using some simple commands.
Show current user:
whoamiShow logged users:
whoChange file permission:
chmod +x file.shChange file ownership:
chown user:user file.txtSwitch user:
su usernameChange password:
passwdTermux Advanced Utility Commands
Termux Advanced Utility Commands provide extra terminal features for automation, task management, system operations, and workflow improvement. It allows running scripts, monitoring logs, creating shortcuts, and handling advanced terminal activities from the command line.
Show command history:
historyCreate custom alias:
alias ll='ls -la'Run shell script:
bash script.shMonitor live logs:
tail -f log.txtSynchronize files:
rsync -av folder backup/Show current date:
dateShow calendar:
calGenerate MD5 hash:
md5sum file.txtGenerate SHA256 hash:
sha256sum file.txtTermux Terminal Productivity Commands
Termux Terminal Productivity Commands improve workflow speed, task handling, and multitasking in Termux. It allows managing background processes, running multiple terminal sessions, and controlling active tasks more efficiently.
Run process in background:
command &Show background jobs:
jobsBring process to foreground:
fgOpen terminal multiplexer:
tmuxOpen screen session:
screenRepeat command output:
watch dateTermux Fun & Cool Commands
Termux Fun & Cool Commands make the terminal more interactive and visually interesting while using Linux commands on Android devices. It allows displaying system information, running terminal animations, creating ASCII text, and customizing the terminal experience in different creative ways.
Install Neofetch:
pkg install neofetch -yShow system information:
neofetchInstall CMatrix:
pkg install cmatrix -yRun Matrix animation:
cmatrixInstall Cowsay:
pkg install cowsay -yDisplay message:
cowsay HelloInstall Figlet:
pkg install figlet -yCreate ASCII text:
figlet TERMUXTermux SSH Commands
Termux SSH Commands provide secure remote access features for connecting to Linux servers and other devices in Termux. It allows starting SSH services, connecting to remote systems, transferring files securely, and managing servers from the terminal.
Install OpenSSH:
pkg install openssh -yStart SSH server:
sshdConnect to remote server:
ssh user@server-ipConnect using custom port:
ssh -p 2222 user@server-ipGenerate SSH key:
ssh-keygenCopy files using SCP:
scp file.txt user@server:/home/userTermux Python Commands
Termux Python Commands allow running Python scripts, installing Python packages, creating virtual environments, and managing development projects in the terminal. It provides a simple way to practice programming, automation, scripting, and development tasks using simple commands.
Install Python:
pkg install python -yCheck Python version:
python --versionOpen Python shell:
pythonRun Python script:
python app.pyInstall Python package:
pip install requestsUpgrade pip:
pip install --upgrade pipList installed packages:
pip listCreate virtual environment:
python -m venv myenvActivate virtual environment:
source myenv/bin/activate120+ Useful Termux Commands Quick List
Below is a quick list of useful Termux commands for beginners and advanced users. These commands cover file management, package installation, networking, development, system monitoring, SSH, Python, and many other terminal tasks in Termux.
Termux Basic Commands
pwd: Shows current directory path.ls: Lists files and folders.ls -a: Shows hidden files.ls -l: Shows detailed file list.cd foldername: Opens a folder.cd ..: Goes back one directory.cd: Opens home directory.clear: Clears terminal screen.mkdir folder: Creates a new folder.touch file.txt: Creates a new file.rm file.txt: Deletes a file.rm -rf folder: Deletes a folder.cp file.txt /sdcard/: Copies files.mv file.txt /sdcard/: Moves files.cat file.txt: Displays file content.nano file.txt: Edits files using Nano.
Package Management Commands
pkg update: Updates package list.pkg upgrade: Upgrades installed packages.pkg install python: Installs Python.pkg install git: Installs Git.pkg install wget: Installs wget.pkg install curl: Installs curl.pkg uninstall python: Removes Python.pkg search python: Searches Python packages.pkg list-installed: Shows installed packages.apt update: Updates APT packages.apt install nodejs: Installs Node.js.apt remove package: Removes packages.apt autoremove: Removes unused packages.
Files & Directory Commands
find . -name file.txt: Finds files.grep hello file.txt: Searches text in files.stat file.txt: Shows file information.file file.txt: Detects file type.du -sh folder: Shows folder size.df -h: Shows storage usage.chmod +x file.sh: Changes file permission.chown user:user file.txt: Changes ownership.ln -s file shortcut: Creates shortcut links.tree: Shows folder structure.
System & Process Commands
top: Shows running processes.htop: Opens advanced process viewer.ps aux: Lists active processes.kill PID: Stops process using PID.killall python: Stops all Python processes.free -h: Shows memory usage.uptime: Shows system uptime.uname -a: Shows system information.neofetch: Displays system details.history: Shows command history.
Compression & Archiving Commands
zip archive.zip file.txt: Creates ZIP archive.unzip archive.zip: Extracts ZIP files.tar -cvf file.tar folder: Creates TAR archive.tar -xvf file.tar: Extracts TAR archive.gzip file.txt: Compresses files.gunzip file.gz: Extracts GZ files.7z a archive.7z file.txt: Creates 7z archive.7z x archive.7z: Extracts 7z archive.
Networking Commands
ping google.com: Checks internet connection.wget URL: Downloads files.curl -O URL: Downloads files using curl.ifconfig: Shows IP address.ip a: Shows network interfaces.traceroute google.com: Tracks network path.nslookup google.com: Performs DNS lookup.whois google.com: Shows domain information.netstat -tulnp: Shows network connections.nmap example.com: Scans network targets.
Git & Development Commands
git clone URL: Downloads GitHub repository.git status: Shows repository status.git pull: Downloads latest updates.git push: Uploads repository changes.git add .: Adds files to commit.git commit -m "msg": Creates commit.node app.js: Runs Node.js file.npm install: Installs Node.js packages.python app.py: Runs Python script.php -S localhost:8080: Starts PHP server.
Permission & Users Commands
whoami: Shows current user.who: Shows logged users.passwd: Changes password.groups: Shows user groups.id: Shows user ID information.chmod 777 file.txt: Gives full permission.su username: Switches user.sudo command: Runs command as root.
Advanced Utility Commands
alias ll='ls -la': Creates shortcut command.bash script.sh: Runs shell script.tail -f log.txt: Monitors live logs.rsync -av folder backup/: Synchronizes files.date: Shows current date.cal: Displays calendar.md5sum file.txt: Generates MD5 hash.sha256sum file.txt: Generates SHA256 hash.watch date: Repeats command output.yes: Prints repeated text endlessly.
Terminal Productivity Commands
command &: Runs process in background.jobs: Shows background jobs.fg: Brings process to foreground.bg: Sends process to background.tmux: Opens tmux session.screen: Opens screen session.reset: Resets terminal.time command: Measures command execution time.
Fun & Cool Commands
cmatrix: Runs Matrix animation.cowsay Hello: Displays message in ASCII cow.figlet TERMUX: Creates ASCII text.toilet HELLO: Displays styled text.sl: Runs train animation.fortune: Shows random quotes.oneko: Displays cat animation.espeak Hello: Converts text to speech.
SSH Commands
pkg install openssh: Installs OpenSSH.sshd: Starts SSH server.ssh user@server-ip: Connects to server.ssh -p 2222 user@ip: Connects using custom port.ssh-keygen: Generates SSH key.scp file.txt user@server:/home/user: Copies files remotely.sftp user@server-ip: Starts SFTP connection.ssh localhost: Connects local SSH server.
Python Commands
pip install --upgrade pip: Upgrades pip tool.pkg install python: Installs Python.python --version: Shows Python version.python: Opens Python shell.python app.py: Runs Python script.pip install requests: Installs Python package.pip list: Shows installed packages.pip uninstall package: Removes Python package.python -m venv myenv: Creates virtual environment.source myenv/bin/activate: Activates virtual environment.
These useful Termux commands cover many important tasks like file management, networking, development, automation, and system control in Termux. Practicing these commands regularly makes using the Termux terminal faster, easier, and more comfortable.
End Note
Termux provides a simple way to use Linux commands, development tools, networking utilities, and cybersecurity packages on Android devices without root access. Learning these Termux Basic to Advanced commands makes terminal usage easier and improves understanding of Linux-based environments on mobile devices.

