List of Termux commands

Termux-commands-list

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

Before getting into Termux command we must know What is Termux and what are the uses of 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.

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.

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 don't have Termux then you can install it from the below links:



So here is the List of best Termux commands:

Termux commands list and uses

These Termux commands you must master, these commands are very useful, these commands will often be used to install, manage applications, files, folders, and many more.

1. pkg search <package name>

The above command will be used to search for a package is available or not, for Example:

pkg search metasploit

2. pkg install <package name>

The above Termux command will be used to install a package or you can say that tool. 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.

3. pkg uninstall <package name>

The above Termux command will be used to uninstall a package or a tool. The example of the command is shown below:

pkg uninstall metasploit

By typing the above command Metasploit will be uninstalled. 

4. pkg reinstall <package name>

The above command will reinstall the package for example:

pkg reinstall metasploit

5. pkg show <package name>

The above Termux command will show you detailed information about the package. The example of the command is shown below:

pkg show metasploit

6. pkg list-installed

The above command will show you the list of the packages that are installed in your Termux.

7. pkg list-all

The above Termux command will show you the list of all available packages for your Termux.

8. pkg files <package name>

The above command will show you the location of installed files and packages For example:

pkg files metasploit

9. pkg update && pkg upgrade -y

The above Termux command will update and upgrade your Termux packages.

10. clear

The above command will clean the Termux console window.

11. pwd

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

12. cd

The above command is used to move from one directory to another. for example:

cd $HOME

cd /sdcard

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

13. ls

The above Termux command is used to see the files and folders that are present in the directory. Use ls -lha to view detailed information from files and folders.

14. cp

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

cp /sdcard/document $HOME

15. mv

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

16. rm

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 as "Document" then I will use the following command to delete that folder

rm -rf Document

17 chmod

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

chmod +x <filename>

or

chmod 777 <filename>

The above command will give the file permission to read write and execute. 

18. cat <file name>

To read any text, HTML or python file 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

19. zip <file name>

To put the file in zip.

20. unzip <file name>

To unzip the file.

Note: In order to use zip and unzip command you will need to install zip by typing the following Termux command 

pkg install zip

21 mkdir

The above Termux command is used to make a directory. For example, I want to create a directory or a folder named "Termux". Then I will use the following command:

mkdir Termux

22. rmdir

The above Termux command is used to remove a directory. For example, I want to remove a directory or a folder named "Termux". Then I will use the following command:

rmdir Termux

23. netstat 

The netstat commands show networks and statistics.

Read more about netstat command from here:


24. df

Shows the size of the object in the specified folder. for example, I want to know the size of the object that is present in "Termux" folder, Then I will use the following command.

df Termux

25. exit

The above command closes the Termux.

26. open <file name>

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

27. ping

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

ping google.com

28. cal

To the above Termux command is used to show the calendar.

29. date

The above command print the date.

30. history

The above command will show the history of the commands that you had typed before.

31. wget

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

wget <URL>

32. git clone

The above command will help you to clone packages that are available on Github. Usage of this command is mentioned below:

git clone <URL of Package on Github>

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


What commands should I type After Installing Termux

As you install Termux in 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 commands:

1. pkg install root-repo

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

2. pkg install unstable-repo

The above 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.

3. pkg install x11-repo

The above 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.

4. termux-setup-storage

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 fix after typing this command.

5. pkg install wget

After using this command you will be able to download the packages from URL.

6. pkg install git

This is the most important command. This command will let your Termux to clone and download the packages from Github.

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

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 error. If you think that we had missed any important command then let us know in the comment section. I hope this article is helpful to you.

Post a Comment

Previous Post Next Post