Termux: List Of Basic Commands You Need To Know

termux basic commands

This guide will show you the best Termux commands for beginners. With these Termux commands, you’ll be able to operate Termux with ease. Before getting into the Termux command, let’s first take a look at what Termux is and what it can be used for.

In simple terms, Termux is an Android terminal emulator and Linux environment app that does not require any root access. That means you can run Termux without rooting your Android device.

So now that we know what Termux is, let’s take a look at some of the best commands that beginners can use. Get familiar with all the Termux commands, from basic to advanced! This ultimate guide provides detailed info along with examples and syntax that will help you get up and running in no time.

List Of Termux Commands For Package Management

List of Termux CommandsUses of Termux Commands
pkg search PACKAGE NAME HEREAllows you to search a particular package.
pkg install PACKAGE NAME HEREInstall a package.
pkg uninstall PACKAGE NAME HEREuninstall a package.
pkg reinstall PACKAGE NAME HEREReinstall a package.
pkg show PACKAGE NAME HEREGet detailed inormation about the package.
pkg-list-installedList installed Termux package.
pkg-list-allList all available package for Termux.
pkg autocleanRemoves packages which are not longer needed.
pkg cleancleanup the local cache of packages downloaded from remote repositories.
pkg files PACKAGE NAME HEREShows the location of the files.
pkg updateUpdate the Termux packages.
pkg upgradeUpgrade the Termux packages.
pkg update && pkg upgrade -yUpdate and Upgrade the Termux packages.

List Of Termux Basic Shell Commands

List of Termux CommandsUses of Termux Commands
historyShows the history of previously typed commands.
calShows Calander.
dateShows current date.
helpDisplays information about shell built-in commands.
exitUse this command to close the Termux.
uptimeShows the uptime of your operating system.
dfDisplays the amount of disk space available on the file system.
findSearch for files in a directory hierarchy.
suChange user ID or become superuser.
echoWrite arguments to the standard output.
passwdChange user’s password. If no user is specified, changes the password for the current user.
duSummarize disk space used for each FILE and/or directory.
whoamiDisplays user, group and privileges information for the user who is currently logged on to the local system.
ifconfigConfigure network interface parameters.
pingSend ICMP ECHO_REQUEST to network hosts.
netstatPrint network connections, routing tables, interface statistics, masquerade connections, and multicast memberships.
sleepSuspends program execution for a specified time.

Some Additional Termux Commands List

List of Termux CommandsUses of Termux Commands
zip FILENAMECompress a file.
unzip FILENAMEDecompress a file.
wget URL HEREDownload a file from the web.
git clone URL OF GITHUB HEREClone the packages from Github to your system.
envAllows you to display your current environment or run a specified command in a changed environment.
termux-setup-storageGrant Termux to access the device storage.

List Of Termux Commands For File Management

List of Termux CommandsUses of Termux Commands
lsList information about files and directories within the file system.
touch FILENAMECreate a new file.
cat FILENAMEcat command is used to display the contents of a file.
cpcp command is used to create the copy of a file.
mvmv command is used to move a file from source to destination.
rm FILENAMEdelete a file
rm -rf DIRECTORY NAMEForce delete the given directory.
mkdir NEW DIRECTORY NAMECreate a new directory.
rmdir DIRECTORY NAMERemove a directory.
cd DIRECTORY NAMEChange the directory.
pwdPrints the current working directory.
chmod 777 FILENAMEModify the permission of the file. Anyone can read, write, and execute the file.

Update all the packages and dependencies installed on the system:

 apt update && apt upgrade

If any update is available it will ask you on the terminal if you want to upgrade or not, press Y if you want the update.

Grant storage permission:


now you can access your Storage and all the folder in it using termux.

Know Which directory you are in:


This command will tell you, your present working directory

List all the files and directories:


this command will show you the folder and files in your current working directory.

List all the files and directories including Hidden Files:

ls -a

ls command with -a will show you all the hidden files as well.

Move forward in directories:

 cd storage

cd command allows you to move in a folder just type cd and the folder name you wanna move here I am moving in storage.

Move backward in directories:

 cd ..

 by typing cd ..(between cd and .. we have to put space) you will go back in the directory you were in.

Clear Screen:


by typing clear in the termux you can clear all the previous results.

Create a folder or a directory:

 mkdir folderName

mkdir Stand for make directory. Type mkdir and give a space and type folder name and press enter to see the folder you have just created just type ls.

Delete a folder or a directory:

 rmdir folderName

Rmdir stands for Remove Directory.Type rmdir space folder name to remove that folder.

Delete Non-Empty directory or folder in termux:

 rm -rf folderName

Please use this command with caution. This command will remove a folder and all the files and folders within it. This command is useful when you want to delete any project downloaded from Github.

Copy a file from one directory to another directory:

 cp files-name file-path

You can copy files by typing cp the file name and after giving a space you can type the path where you wanna copy the file E.g: cp virus.apk /storage/shared this will copy the virus.apk to the storage/shared folder.

Move a file from one directory to another directory:

mv files-name file-path

You can move files by typing mv the file name and after giving a space you can type the path where you wanna move the file E.g: mv virus.apk /storage/shared this will move the virus.apk to the storage/shared folder.

Search for the specific package in termux:

 pkg search package-name

It will show you all the package related to that package name.

See the Details of a Package in Termux:

apt show nano

This command will show you the complete detail of a package.

List all the available packages in termux:

 pkg list-all

it will show you all the packages that are available in the APT repository of termux.

Install a Package:

 pkg install packageName

you can install any package from the list, just type pkg install package-name.

Uninstall a Package:

 pkg uninstall packageName

you can uninstall any package from the list, just type pkg uninstall package-name.it will ask you where if you wanna delete the package or not press y and the package will be uninstalled.

Install Python in termux:

 pkg install python

Just type this command and it will be installed in your termux press y if it asks for confirmation.after installing python you can write code and also run your own python scripts. Type python to check if python is installed correctly or not.

Install Git in termux:

 pkg install git

Git will allow you to download any project from GitHub.

Download projects from GitHub repository :

 git clone Link-of-the-project

If you want to download any project from the git hub you can just use the above just change the Link-of-the-project with your link
e.g: git clone https://github.com/khansaad1275/Termux-YTD

Check all the running processes in Termux:


This command will show you all the tasks running on your termux. To quit the top command on termux just press CTRL+C on your keyboard.

Make any bash file Executable :

chmod +x filename

If you are trying to run any bash file and you are getting a permission denied error then you can  use the above command to make it executable 

Create a text file in termux:

  1. first, you have to download a package name nano. Type on termux pkg install nano press y when asking for confirmation.
  2. type nano on the terminal.
  3. type anything you want I am typing hello world.
  4. Press CTRL+X and press Y to save the file.
  5. Give the file name anyname.txt and press enter.
  6. Type ls command to see your directory.

See what’s inside a text file:

 cat file-name

Run this command and everything in the text file will be printed on the terminal.
e.g: cat data.txt

Delete a file in termux:

 rm file-name

To delete any file within the directory in, just type the rm name of your file and press enter and it will be deleted.
e.g: rm data.txt

List all the installed Packages in termux:

 dpkg –list

By Using this command You will be able to see all the installed packages in your termux app.

List all commands that You have used in termux:


This command will give you a list of all the recent commands that you have used in termux.

Check your Username :


This will show you the user-name in your termux.

Check your Termux usage time :


This will show, How much time you have spent using termux.

Check your Kernel info in Termux:

uname -a

This will show you info about your system as well as you can also check your Architecture using this command. 

Check your Memory Usage in Termux:

free -h -t

This will show you the amount of free and used memory in the system

Termux commands list pdf download

Read Also:

Advance Linux terminal commands for The Power users

8 Most Common Hacking Techniques You Must Know

Dorking Cheat Sheet for Advance Searching


Leave a Reply