Join WhatsApp

Join Now

Join Telegram

Join Now

Subscribe YouTube

Subscribe

Termux Commands List | Complete Guide 2026 (Basics To Advanced)

By Saboor Shawkat

Updated on:

Termux Commands List
5/5 - (2 votes)

If You Are Looking For A Complete Termux Commands List Then You Have Come To The Right Place. In This Post We Will Cover Every Important Termux Command From Basic To Advanced With Proper Explanation And Examples So That You Can Easily Understand And Use Them On Your Android Device. Whether You Are A Complete Beginner Who Is Just Getting Started With Termux Or An Advanced User Who Wants To Explore More Commands, This Post Has Everything You Need.

We Will Go Through All The Important Categories Of Termux Commands Including Package Management Commands, File System Commands, Networking Commands, Text Editing Commands, Process Management Commands And Many More. So Without Wasting Any More Time Let Us Get Started With The Complete Termux Commands List.

Table of Contents

What Is Termux?

Termux Is A Free And Open Source Terminal Emulator Application For Android That Allows You To Run A Full Linux Environment Directly On Your Android Device Without Needing Root Permission. Termux Gives You Access To A Powerful Command Line Interface Where You Can Run Linux Commands, Install Packages, Write Scripts, Run Programming Languages Like Python And Much More All From Your Android Phone Or Tablet.

Termux Is Available For Free On F-Droid And Is Used By Millions Of Developers, Security Researchers And Linux Enthusiasts All Around The World. The Best Thing About Termux Is That It Does Not Need Root Access To Work And Can Be Used On Almost Any Android Device That Runs Android 7.0 Or Higher.


How To Get Started With Termux?

Before You Start Using The Termux Commands List You Need To Make Sure That Termux Is Properly Installed And Updated On Your Android Device. Follow The Below Steps To Get Started:

Step 1: Download And Install Termux From My Website. Always Download Termux From F-Droid And Not From The Google Play Store As The Play Store Version Is No Longer Updated.

Step 2: Open Termux And Run The Below Command To Update And Upgrade All The Packages Before You Start Using Termux.

ShellScript
pkg update && pkg upgrade -y

Step 3: After The Update Is Done You Are Ready To Start Using All The Termux Commands Listed Below.


Termux Basic Commands List

These Are The Most Basic And Important Termux Commands That Every Termux User Should Know. These Commands Are The Foundation Of Using Termux And You Will Use These Commands Almost Every Day.

clear

The clear Command Is Used To Clear The Termux Terminal Screen. When Your Terminal Gets Too Cluttered With Output You Can Use This Command To Clean It Up.

ShellScript
clear

echo

The echo Command Is Used To Print A Text Or A Message On The Termux Terminal Screen. It Is One Of The Most Used Commands In Termux.

ShellScript
echo "Hello World"

pwd

The pwd Command Stands For Print Working Directory. It Is Used To Show The Current Directory That You Are In Right Now In Termux.

ShellScript
pwd
pwd

whoami

The whoami Command Is Used To Display The Name Of The Current User That Is Logged Into Termux. In Termux It Will Usually Show u0_a Followed By A Number.

ShellScript
whoami

date

The date Command Is Used To Display The Current Date And Time In Your Termux Terminal.

ShellScript
date

history

The history Command Is Used To Show A List Of All The Commands That You Have Previously Typed In Termux During Your Session.

ShellScript
history

exit

The exit Command Is Used To Close And Exit The Current Termux Session.

ShellScript
exit

help

The help Command Can Be Used To Get Help Information About Any Built In Termux Command. You Can Also Use –help Flag After Any Command To Get More Information About That Command.

ShellScript
[command] --help

Termux Package Management Commands

Package Management Commands Are Used To Install, Remove, Update And Manage All The Packages And Tools In Termux. These Are Some Of The Most Important Commands You Will Use In Termux.

pkg update

The pkg update Command Is Used To Update The List Of All Available Packages In Termux. You Should Always Run This Command Before Installing Any New Package.

ShellScript
pkg update
pkg update

pkg upgrade

The pkg upgrade Command Is Used To Upgrade All The Already Installed Packages In Termux To Their Latest Available Versions.

ShellScript
pkg upgrade -y
pkg upgrade

pkg update && pkg upgrade

This Is The Combined Command That Updates The Package List And Then Upgrades All The Installed Packages In One Single Step. This Is The Recommended Way To Keep Termux Updated.

ShellScript
pkg update && pkg upgrade -y

pkg install

The pkg install Command Is Used To Install Any New Package Or Tool In Termux. Replace [package-name] With The Name Of The Package You Want To Install.

ShellScript
pkg install [package-name] -y

Examples:

ShellScript
pkg install python -y
pkg install git -y
pkg install nmap -y
pkg install wget -y

pkg uninstall

The pkg uninstall Command Is Used To Remove Or Uninstall Any Installed Package From Termux.

ShellScript
pkg uninstall [package-name]

pkg list-installed

The pkg list-installed Command Is Used To Show A List Of All The Packages That Are Currently Installed In Your Termux.

ShellScript
pkg list-installed

pkg list-all

The pkg list-all Command Is Used To Show A List Of All The Packages That Are Available To Install In Termux.

ShellScript
pkg list-all

The pkg search Command Is Used To Search For A Specific Package In Termux. Replace [keyword] With The Name Of The Package You Are Looking For.

pkg search [keyword]

pkg show

The pkg show Command Is Used To Show Detailed Information About A Specific Package In Termux Including Its Version, Size And Dependencies.

ShellScript
pkg show [package-name]

apt-get install

You Can Also Use The apt-get Command To Install Packages In Termux. It Works The Same Way As pkg install But Is The Older Style Command.

ShellScript
apt-get install [package-name] -y

Termux File System Commands

File System Commands Are Used To Navigate, Create, Delete And Manage Files And Directories In Termux. Another Category In Termux Commands List. These Commands Are Very Important For Every Termux User.

ls

The ls Command Is Used To List All The Files And Directories Inside The Current Directory In Termux.

ShellScript
ls

You Can Also Use ls -la To Show All Files Including Hidden Files With Their Detailed Information Like Permissions, Size And Date.

ShellScript
ls -la

cd

The cd Command Stands For Change Directory And Is Used To Navigate Between Directories In Termux.

ShellScript
cd [directory-name]

Examples:

ShellScript
cd Downloads
cd /sdcard
cd ..
cd ~

mkdir

The mkdir Command Is Used To Create A New Directory Or Folder In Termux.

ShellScript
mkdir [directory-name]
mkdir

rmdir

The rmdir Command Is Used To Remove Or Delete An Empty Directory In Termux.

rmdir
ShellScript
rmdir [directory-name]

touch

The touch Command Is Used To Create A New Empty File In Termux.

ShellScript
touch [filename]

Example:

ShellScript
touch myfile.txt

rm

The rm Command Is Used To Remove Or Delete A File In Termux. Be Careful When Using This Command As Deleted Files Cannot Be Recovered.

ShellScript
rm [filename]

To Delete A Directory And All Its Contents Use The -rf Flag.

ShellScript
rm -rf [directory-name]

cp

The cp Command Is Used To Copy A File From One Location To Another In Termux.

ShellScript
cp [source] [destination]

mv

The mv Command Is Used To Move A File From One Location To Another In Termux. It Can Also Be Used To Rename A File.

ShellScript
mv [source] [destination]

cat

The cat Command Is Used To Display The Contents Of A File Directly In The Termux Terminal.

ShellScript
cat [filename]

The head Command Is Used To Display The First 10 Lines Of A File In Termux. You Can Also Specify The Number Of Lines Using The -n Flag.

ShellScript
head [filename]
head -n 20 [filename]

tail

The tail Command Is Used To Display The Last 10 Lines Of A File In Termux. You Can Also Specify The Number Of Lines Using The -n Flag.

ShellScript
tail [filename]
tail -n 20 [filename]

find

The find Command Is Used To Search For Files And Directories In Termux Based On Different Criteria Like Name, Size Or Date.

ShellScript
find [path] -name [filename]

Example:

ShellScript
find . -name "*.txt"

grep

The grep Command Is Used To Search For A Specific Pattern Or Text Inside A File In Termux.

ShellScript
grep "[pattern]" [filename]

wc

The wc Command Is Used To Count The Number Of Lines, Words And Characters In A File In Termux.

ShellScript
wc [filename]

zip

The zip Command Is Used To Compress Files Into A ZIP Archive In Termux.

ShellScript
zip [archive-name.zip] [filename]

unzip

The unzip Command Is Used To Extract Files From A ZIP Archive In Termux.

ShellScript
unzip [archive-name.zip]

Termux File Permission Commands

File Permission Commands Are Used To View And Change The Permissions Of Files And Directories In Termux. Another Category In Termux Commands List. These Commands Are Very Useful When Working With Scripts And Tools.

chmod

The chmod Command Is Used To Change The Permission Of A File Or Directory In Termux. The Most Common Use Is To Make A Script Executable.

ShellScript
chmod +x [filename]

To Set Specific Numeric Permissions Use The Number Format.

ShellScript
chmod 755 [filename]
chmod 777 [filename]

chown

The chown Command Is Used To Change The Owner Of A File Or Directory In Termux.

ShellScript
chown [user] [filename]

Termux Text Editor Commands

Termux Has Two Main Text Editors That You Can Use To Create And Edit Files Directly In The Terminal. Another Category In Termux Commands List. These Are nano And vim.

nano

The nano Command Is Used To Open The Nano Text Editor In Termux. Nano Is A Very Simple And Beginner Friendly Text Editor.

ShellScript
nano [filename]

Useful Nano Shortcuts:

  • CTRL + X โ€” Exit Nano
  • CTRL + S โ€” Save The File
  • CTRL + K โ€” Cut A Line
  • CTRL + U โ€” Paste A Line
  • CTRL + W โ€” Search In The File

vim

The vim Command Is Used To Open The Vim Text Editor In Termux. Vim Is A More Advanced Text Editor With Many Features.

ShellScript
vim [filename]

Useful Vim Commands:

  • i โ€” Enter Insert Mode To Start Typing
  • ESC โ€” Exit Insert Mode
  • :w โ€” Save The File
  • :q โ€” Quit Vim
  • :wq โ€” Save And Quit Vim

Termux Networking Commands

Networking Commands Are Used To Perform Network Related Tasks In Termux Like Checking IP Addresses, Downloading Files And Testing Network Connectivity.

ping

The ping Command Is Used To Test The Network Connectivity Between Your Device And A Target Host In Termux.

ShellScript
ping [hostname or IP]

Example:

ShellScript
ping google.com

wget

The wget Command Is Used To Download Files From The Internet Directly In Termux. Install It First Using pkg install wget -y.

ShellScript
wget [URL]

curl

The curl Command Is Used To Transfer Data From Or To A Server In Termux. It Supports Many Protocols Including HTTP, HTTPS And FTP.

ShellScript
curl [URL]

ifconfig

The ifconfig Command Is Used To Display The Network Interface Information Including Your IP Address In Termux.

ShellScript
ifconfig

netstat

The netstat Command Is Used To Display All The Active Network Connections And Listening Ports In Termux.

ShellScript
netstat

nslookup

The nslookup Command Is Used To Query DNS Records And Find The IP Address Of A Domain Name In Termux.

ShellScript
nslookup [domain]

traceroute

The traceroute Command Is Used To Trace The Network Path Between Your Device And A Target Host In Termux.

ShellScript
traceroute [hostname]

ssh

The ssh Command Is Used To Connect To A Remote Server Securely Using The SSH Protocol In Termux.

ShellScript
ssh [username]@[hostname]

Termux Process Management Commands

Process Management Commands Are Used To View, Manage And Control The Running Processes In Termux.

ps

The ps Command Is Used To Display A List Of All The Currently Running Processes In Termux.

ShellScript
ps

top

The top Command Is Used To Display A Real Time View Of All The Running Processes Along With Their CPU And Memory Usage In Termux.

ShellScript
top

kill

The kill Command Is Used To Terminate A Running Process In Termux Using Its Process ID.

ShellScript
kill [PID]

killall

The killall Command Is Used To Terminate All Processes With A Specific Name In Termux.

ShellScript
killall [process-name]

bg

The bg Command Is Used To Send A Paused Process To Run In The Background In Termux.

ShellScript
bg

fg

The fg Command Is Used To Bring A Background Process Back To The Foreground In Termux.

ShellScript
fg

Termux Python Commands

Python Is One Of The Most Popular Programming Languages And Can Be Very Easily Installed And Used In Termux. Another Category In Termux Commands List. Here Are The Most Important Python Commands For Termux.

Install Python In Termux

ShellScript
pkg install python -y

Check Python Version

ShellScript
python --version

Run A Python Script

ShellScript
python [script-name.py]

Open Python Interactive Shell

ShellScript
python

Install Python Libraries Using Pip

ShellScript
pip install [library-name]

Examples:

ShellScript
pip install requests
pip install numpy
pip install flask

List Installed Python Libraries

ShellScript
pip list

Upgrade A Python Library

ShellScript
pip install --upgrade [library-name]

Termux Git Commands

Git Is A Very Popular Version Control System That Can Be Easily Installed And Used In Termux. Here Are The Most Important Git Commands For Termux.

Install Git In Termux

ShellScript
pkg install git -y

Clone A Repository From GitHub

ShellScript
git clone [repository-URL]

Check Git Version

ShellScript
git --version

Initialize A New Git Repository

ShellScript
git init

Check Repository Status

ShellScript
git status

Add Files To Staging Area

ShellScript
git add .

Commit Changes

ShellScript
git commit -m "Your commit message"

Push Changes To GitHub

ShellScript
git push origin main

Pull Latest Changes From GitHub

ShellScript
git pull

Check Commit History

ShellScript
git log

Termux Storage Commands

Storage Commands Are Used To Give Termux Access To Your Android Device Storage And To Manage Files Between Termux And Your Android File System.

termux-setup-storage

The termux-setup-storage Command Is Used To Give Termux Permission To Access Your Android Device Storage. You Must Run This Command First Before You Can Access Your Android Files From Termux.

ShellScript
termux-setup-storage

After Running This Command A Permission Dialog Will Appear On Your Screen. Allow The Storage Permission And Then You Will Be Able To Access Your Android Storage From Termux Using The /sdcard Path.

Access Android Storage In Termux

ShellScript
cd /sdcard

Check Available Storage Space

ShellScript
df -h

Check Directory Size

ShellScript
du -sh [directory-name]

Termux SSH Commands

SSH Commands Are Used To Connect To Remote Servers And To Set Up SSH Server In Termux So That You Can Access Termux From Another Device.

Install OpenSSH In Termux

ShellScript
pkg install openssh -y

Start SSH Server In Termux

ShellScript
sshd

Connect To A Remote Server From Termux

ShellScript
ssh [username]@[IP-address]

Connect To A Remote Server On A Specific Port

ShellScript
ssh -p [port] [username]@[IP-address]

Generate SSH Key Pair In Termux

ShellScript
ssh-keygen

Stop SSH Server In Termux

ShellScript
pkill sshd

Termux Keyboard Shortcuts

These Keyboard Shortcuts Are Very Useful For Working Faster And More Efficiently In Termux.

ShortcutFunction
CTRL + CStop The Currently Running Command
CTRL + DExit The Current Termux Session
CTRL + ZPause The Currently Running Process
CTRL + LClear The Terminal Screen
CTRL + AMove Cursor To The Beginning Of The Line
CTRL + EMove Cursor To The End Of The Line
CTRL + UClear The Entire Current Line
CTRL + KClear Everything After The Cursor
CTRL + WDelete The Word Before The Cursor
TABAuto Complete Commands And File Names
Volume Up + QShow The Termux Extra Keys Row
Volume Up + WOpen A New Termux Session

Conclusion

In This Post We Have Covered A Complete And Detailed Termux Commands List From Basic To Advanced. We Covered All The Important Categories Including Basic Commands, Package Management Commands, File System Commands, File Permission Commands, Text Editor Commands, Networking Commands, Process Management Commands, Python Commands, Git Commands, Storage Commands And SSH Commands. All These Commands Will Help You Work More Efficiently And Productively In Termux On Your Android Device. Bookmark This Post So That You Can Come Back And Refer To It Whenever You Need To Look Up A Termux Command. If You Have Any Query Related To This Post You Can Just Comment Below Or Contact Us Through The Contact Us Page. Thanks For Reading ๐Ÿ˜Š

Frequently Asked Questions

What Is The First Command To Run In Termux?

The First Command You Should Always Run After Installing Termux Is pkg update && pkg upgrade -y. This Will Update All The Packages In Termux And Make Sure Everything Is Up To Date Before You Start Using It.

How Do I Install A Package In Termux?

You Can Install Any Package In Termux By Using The pkg install [package-name] -y Command. For Example To Install Python You Can Use pkg install python -y.

How Do I Access My Android Storage In Termux?

You Can Access Your Android Storage In Termux By First Running termux-setup-storage To Grant Storage Permission And Then Using cd /sdcard To Navigate To Your Android Storage.

What Is The Difference Between pkg update And pkg upgrade In Termux?

pkg update Updates The List Of Available Packages In Termux While pkg upgrade Actually Upgrades The Already Installed Packages To Their Latest Versions. You Should Run Both Commands Together Using pkg update && pkg upgrade -y.

How Do I Stop A Running Command In Termux?

You Can Stop Any Running Command In Termux By Pressing CTRL + C On Your Keyboard. This Will Immediately Terminate The Currently Running Process In Termux.

Can I Run Python In Termux?

Yes, You Can Easily Run Python In Termux By First Installing It Using pkg install python -y And Then Running Your Python Scripts Using python [script-name.py] Command.

How Do I Clear The Termux Screen?

You Can Clear The Termux Terminal Screen By Typing The clear Command And Pressing Enter. You Can Also Use The CTRL + L Keyboard Shortcut To Clear The Screen Faster.

Is Termux Safe To Use?

Yes, Termux Is A Safe And Legitimate Application That Is Available On F-Droid. It Is Used By Millions Of Developers And Linux Enthusiasts All Over The World. However You Should Always Download Termux From F-Droid And Not From The Google Play Store As The Play Store Version Is No Longer Updated And May Have Issues.

Leave a Comment