Termux Commands List: Descriptive list of Basic Commands For Termux

Termux-commands-list

In this guide, we have made a list of the best Termux commands for beginners. Without Termux commands, you cannot operate Termux. To operate Termux, you must learn these Termux commands.

Before getting into the Termux command. We must know What is Termux and what are uses it?

In simple words, 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.

With the help of Termux, you can easily install the applications that run on the Linux platform via the APT package manager. Some best tools for Termux are Metasploit, Tool-X, SQLMap, XploitSpy, Wireshark, Fsociety, and many more.

There are two package managers available in Termux first is "apt" and another is "pkg" you can install any app that is available for Termux with the help of these package managers. If you are bored with Termux, you must try some Termux alternatives.

Now let's see what are the uses of Termux. So Termux can be used for improving security and in Ethical hacking. Through Termux, you can easily secure your Wi-Fi or a web application by performing penetration testing and many more things. If you are already an expert in Termux, here are some best Termux tools for you.

If you don't have Termux, you can install it from the below links:



So here is the List of best Termux commands:

Termux Commands List: Descriptive list of Basic Commands For Termux

You need to master these Termux commands because they are very useful in terms of operating the Termux. Without knowing commands, You will not be able to use the Termux. These commands will often be used to install, manage applications, files, folders, and many more. You can also check the list of Best Termux packages

Here is the descriptive list of  Basic Termux commands and their uses:

1.1 Search for package:

pkg search command is used to search for a particular package. You can use the pkg search command to search for Termux packages

pkg search package name

For example:

pkg search metasploit

1.2 Install package

The pkg install command installs Termux packages that are not currently installed and updates packages that are already installed.

pkg install package name

For example:

pkg install metasploit

By using the above command, Metasploit will be installed. If you want to install another package, then remove the Metasploit and then type the name of your own package.

1.3 Uninstall package

Uninstall package command is used to uninstall a package or a tool. You can easily uninstall any package from your Termux by this command.

pkg uninstall package name

Example:

pkg uninstall metasploit

By typing the above command, Metasploit will be uninstalled.

1.4 Reinstall a package in Termux

If you want to reinstall the Termux packages to the same versions as were previously installed, then you can use this command. The pkg reinstall command will first uninstall and then install the package back again to your Termux

pkg reinstall package name

For Example:

pkg reinstall metasploit

1.5 Get detailed info about package

pkg show command generally used to show detailed information about a particular package. Use this command to get detailed information about the package.

pkg show package name

For Example:

pkg show package name

1.6 List installed Termux packages

Use this command to get the list of all packages that are currently installed in your Termux.

pkg-list-installed

1.7 List all Termux packages

pkg list-all command is used to get a list of all available packages for the Termux. Use this command to see the list of all available packages.

pkg list-all

1.8 Show the location of files

pkg files used to show the location of installed files and packages in the Termux. The command with example is shown below:

pkg files package name

For Example:

pkg files metasploit

1.9 Update and Upgrade Termux packages

pkg update && pkg upgrade -y is the mixture of two commands separated by &&. You can use multiple commands in Termux by adding && to the Termux.

First, the pkg update command will get executed, and then the pkg upgrade command will get executed. -y is used to prompt yes.

In simple words, this Termux command will update and upgrade your Termux packages.

pkg update && pkg upgrade -y 

1.10 Clear Termux screen

Use this command to clear the Termux screen

clear

1.11 Print current working directory

Use this Termux command to print the working directory, That means the command will give you a location of the current directory in which you are present.

pwd

1.12 Change directory

You can use this command to change the directory. You can easily move from one directory to another by using this command. The example is given below.

cd $HOME

cd /sdcard

The first command will take you to the Termux home directory, while another command will take you to the sd card of your Android device.

Going back from the directory:

cd ..

cd ../../

1.13 See files and folder of the current directory

Use this Termux command to see the files and folders that are present in the current directory.

ls

You can also use this command to see more information about the files and folders including hidden files.

ls -lha

1.14 Copy files - cp

cp is used to copy the file from one directory to another. For example, I have a file that is present on the sd card, and the name of the file is "document".  And I want to move that document to the Termux home directory, then the following command will be used:

cp /sdcard/document $HOME

1.15 Move files - mv

mv command is used to copy files from one folder to another. The procedure is the same as the above command just use mv instead of cp if you want to move the file.

1.16 Delete files and folder

rm is used to delete files in the directory or a folder. rm -rf used to delete the folder and its content. For example, I want to delete a folder named "Document", then I will use the following command to delete that folder.

rm -rf Document

1.17 Change permission of file and folder

chmod command is used to change the permission of the file and folder. Sometimes some files have only permission to read. To change the permission of a file from reading to read write and execute, we will use the following command:

chmod +x FILE NAME HERE

Or

chmod +x FILE NAME HERE

1.18 Read or create a file

To read any text, HTML, python file, etc cat command is used. For example, I want to read the content of "document.txt", Then I will use the following command:

cat document.txt

Please note that if the file is not present at the given destination. Then the document.txt file will be created.

1.19 Zip command

zip is the popular command of the Termux. Zip command is used to compress and decompress a particular file or folder.

To compress a file, the following command will be used:

zip FILE NAME HERE

To decompress a file, the following command will be used:

unzip FILE NAME HERE

Note: To use the zip and unzip command, you will need to install zip by typing the following Termux command.

pkg install zip

1.20 Create and remove the directory

mkdir command is used to make directories, while rmdir Termux command is used to remove directories.

For example, I want to create a directory/folder named Termux, then I will use the following command:

mkdir Termux

To remove the Termux directory, the following command will be used:

mkdir Termux

1.21 netstat command

The netstat command generates displays that show network status and protocol statistics.

mkdir Termux

Read more about the netstat command from here:


1.22 df command

Shows the size of the object in the specified folder.
df Termux

1.23 Exit The Termux

Use this command to close the Termux.

exit

1.24 Open a file

Open the file with the default application associated with it. For example, I want to open the "readme.txt" file. Then I will use the following Termux command:

open readme.txt


1.25 ping command

The command is used to ping an IP address or a website to ensure the reachability of a device to a specific web or IP address. Example:

open google.com

1.26 Show calender

Use this command to show the calendar.

cal

1.27 Show date

Use this command to print the date.

date


1.28 History of command

Use this Termux command to see the history of the Termux commands that you had typed before.

history


1.29 Download file from Termux

The wget Termux command will let you download any file and Termux package from the URL. Usage of this command is mentioned below:

wget URL HERE

Wget package needs to be installed to use this command. You can install the wget by using the below command:

pkg install wget

1.30 Git clone command

To clone the packages from Github, you will need a git clone command. Usage of this command is mentioned below:

git clone URL OF GITHUB HERE

To use the git clone, the git command must be installed in the Termux. You can install git by typing the below command.

pkg install git

If you want to know Termux in detail, you can read our below article:


Below is the video on the Termux command list and How to use Termux basic commands:





What basic commands should I type After Installing Termux?

As you install Termux on your Android device, the Termux is not configured, and you can't install most of the packages from it. You must configure your Termux for better use by typing the following basic commands in Termux:

2.1 Installation of root repository

The below command will install the root repository in your Termux. After installing this repository, you can easily install packages that are present in the root repository.

pkg install root-repo

2.2 Installation of unstable repository

The below command will install the unstable repository in your Termux.  After installing this repository, you can easily install packages that are present in the unstable repository.

pkg install unstable-repo

2.3 Installation of x11 repository

The below Termux command will install the x-11 repository in your Termux.  After installing this repository, you can easily install packages that are present in the x-11 repository.

pkg install x11-repo

2.4 Setup storage for Termux

The above command will allow the Termux to use your sd card storage. Most of the permission denied issues that you face while accessing the sd card will get fixed after typing this command.

termux-setup-storage

If you are still confused about how to configure the Termux properly, You can see the below video from our YouTube channel.


3. Some Important Termux tools and commands:

Here I listed great Termux commands and tools that you would like to install in your Termux. These Termux tools do not come pre-installed with the Termux.

3.1 Python

Python comes preinstalled on most Linux distributions, But in Termux, you have to install the Python manually. Most of the Termux tools will need Python to run. So Python must be installed in your Termux. 

Here is the termux command to install Python:

pkg install python

3.2 Wget

Wget is a free GNU command-line utility tool used to download files from the internet. Through the wget tool, you can easily download any files from the internet to your Termux.

Here is the command to install the Wget tool:

pkg install wget

3.3 Zip

The Zip command is used to compress or decompress any file. Zip commands come preinstalled in most of the Linux distributions, But in Termux, you have to install the zip command manually.

Here is the command to install the zip:

pkg install zip

4. Termux basic commands list pdf free download

pdf contains the list of basic Termux commands that you can download for free:


Also Read:


Conclusion

So Above is the list of best Termux commands for beginners. You must learn all these commands to properly run the Termux without getting any errors. After learning all the Termux commands, you must try some Termux scripts. I hope this article is helpful to you.

6 Comments

Post a Comment

Previous Post Next Post