In this Ultimate Guide, we’ve made a list of the best Termux commands list for beginners. You cannot run Termux without the Termux commands. You need to learn these Termux commands to run Termux.
Before we get into the Termux commands list, we need to know what is Termux and what is it used for?
Termux is an Android terminal emulator and an Android Linux environment app that operates directly with root and without root. The Terminal Base System installs automatically – additional packages are available from the APT Package Manager.
There are a few basic commands for the Termux Emulator. You can quickly learn these Termux commands if you already use any Linux system and know any Linux OS commands.
Termux can be used to improve security and ethical hacking. With these Termux commands list, you can easily protect your Wi-Fi or web application by performing penetration tests and a lot more. Even if you’re a Termux expert, here are some of the best Termux commands list for you.
If you’re not using Termux, you can download and install it from the link below:
Termux Commands list for Android:
Search for package:
The pkg search command will search for a specific package. You may use the pkg search command to find the Termux packages.
pkg search <package name>
The pkg install command will install Termux packages that are not currently installed and upgrade packages installed.
pkg install <package name>
It will install the package by using the above code. If you want to add another package, delete the name of the package and replace it with the name of your package.
You can use it to uninstall a package or tool. You can safely uninstall all of your Termux packages using this command.
pkg uninstall <package name>
Reinstall a package in Termux
If you’d like to reinstall the Termux packages to the same versions installed before, you can use this command. The pkg reinstall command will first uninstall and then add the package back to your Termux
pkg reinstall <package name>
Detailed info about package
The pkg show command uses to display detailed data about a specific package. Use this command to find out more about the package.
pkg show <package name>
List installed Termux packages
Use this command to get a list of all packages that are installed directly in your Termux framework.
List all Termux packages
The pkg list-all command would get a list of all available Termux packages. Use this command to view the list of all available packages.
Show the location of files.
Pkg files are used only to display the location of installed files and packages in Termux.
pkg files <package name>
👉 Read Also Don’t Miss it:
Update and Upgrade Termux packages
First, it will execute the pkg update command, and then the pkg upgrade command executes. -y used to prompt yes.
Put this Termux command, and it will update and upgrade your Termux packages.
pkg update && pkg upgrade -y
Clear Termux screen
Use this command to clean the screen of Termux.
Print current working directory
Use this Termux command to print the working directory, which means that it will show you the current directory location.
You can switch easily from one directory to another by using this command.
The first command will move you to the home directory of Termux, while the following command will take you to the sd card of your Android phone.
Going back to the directory:
See files and folder of the current directory.
Use this Termux command to view the files and directories in the current directory.
You also can use this command to view more details about files and directories, including secret files.
Copy files – cp
Cp is also used to copy the file from one directory to the next. E.g., I have a file that is available on the sd card, and the file name is “text.” And I want to transfer the document to the home directory of Termux, and then you will use the following command:
cp /sdcard/document $HOME
Move files – mv
The mv command is used to transfer files from one folder to the next. The process is the same as the above command; if you want to move the file, use mv instead of cp.
Delete files and folder
It is used to remove files in a directory or folder. Rm-rf is used to uninstall the folder and its contents. For example, I want to delete a folder called “Document” and then use the following command to delete that folder.
rm -rf Document
Change permission of file and folder.
The chmod command is used to modify the file and folder permissions. Often specific files are only allowed to read. To alter the read permission of the file to read and write, we will use the following command:
chmod +x FILE NAME HERE
chmod +x FILE NAME HERE
Read or create a file.
You can read any document, HTML, python file, etc. For example, I want to check the details of “document.txt.” Then I’ll use the following command:
Please note that the file is not available at the location. It will then generate the document.txt file.
Zip is a standard Termux command. It is used to compress and decompress a single file or folder.
It will use the following command to compress a file:
zip FILE NAME HERE
It will use the following command to decompress a file:
unzip FILE NAME HERE
Note: You will need to install zip by typing the following Termux commands list to use the zip and unzip commands.
pkg install zip
Here are some of the best termux commands list which you can use it.
|cp -v||used to prints informative massage|
|cp -r||used to copy any directory|
|mv -u||update-move when source is newer than destination|
|mv -v||to move any directory|
|ls -n||to display UID and GID directory|
|ls –version||to check the version of ls command|
|cd —||show last working directory from where we moved|
|ls -l||show file action like – modified, date and time, owner of file, permissions Etc.|
|ls help||show display how to use “ls” command|
|cp -n||no file overwrite|
|cd ~||move to users home directory from anywhere|
|cd –||move one directory back from current location|
|mv [file name]||move any file and folder|
|ls -a||list all files including hidden files|
|pwd||it show your current working directory|
|mv -i||interactive prompt before overwrit|
|wget [url]||install tool , apt install wget|
|git clone [url]||install any tools with git clone, apt install git|
|ls -al||formatted listing with hidden files|
|mv -f||force move by overwriting destination files without prompt|
|ls -i||Display number of file or directory|
|cp||copy any file|
|cd /||change to root directory|
|cd ..||change current directory to parent directory|
|curl -O [url]||apt install curl|
|rm||remove or delete files|
|rm [filename]||remove any text files|
|rmdir [dir name]||remove any directory|
|rm -rf||force remove a directory or a folder|
|rm -r [name]||delete a directory called name|
|touch [file name]||create new file|
|mkdir [name]||create a directory or folder|
|more [file name]||output the contents of file|
|head [file name]||output the first 10 line of file|
|tail -f [file name]||output the contents of file as it grows|
|apt install zip||install zip file tool|
|zip name.zip [file]||compress file using this commands|
|unzip [zip file]||to unzip file|
|ftp||launch ftp client from terminal|
|#NAME?||use passive mode|
|bye||terminate current ftp session, exit|
|ascii||set file transfer to ascii protocols|
|bell||bell sound after each command|
|status||shows current status about ftp server|
|open host||open a connection to remote host|
|uname -m||used to find the architecture of your device|
|du||display directory space usage|
|df||display disk usages|
|cal||show display calendar|
|w||show display who is currently online|
|cat /proc/meminfo||show memory related information|
|cat /proc/cpuinfo||show cpu information|
|whoami||show your login name|
|fingure username||shows information about user|
|date||show the current date and time|
|uptime||show the system current uptime|
|man command||show manual a command|
|free||display memory and swap usage|
|kill||send signal to process|
|kill- l||list all of the signal that are possible to send with kill|
|lspci||show PCI devices|
|lsusb||show usb devices|
|locate [file]||find all files with filename|
|locate [query]||find all path names contains a pharse|
|whereis [command]||find location binary /source/man file for a command|
|which [command]||find of an executable|
|grep pattern [files]||searching for pattern in files|
|grep -r pattern files||searching for certain pattern in files|
|find / -atime40||to find all the files, which are accessed 40 days back|
|find / -cmin -60||find change files in last 1 hour|
|ifconfig||shows all configuration a network interface like ip, mac|
|ifconfig eth0||used view the network setting on the interface eth0|
|ifconfig wlan0||view the network setting on wlan0|
|ping [host]||to ping host ip and show results|
|arp||check network card & show ip adress|
|host||display specific server|
|netstat||review network connection|
|nslookup||find out DNS related query|
|tracerout ipadress||display number of hops & respone time to get to a remote system and website|
|whois domain||get whois information of domain|
|dig domain||get DNS information of domain|
|scp||copies file, over a source|
|uname -a||used to display kernal information|
|whereis app||shows possible location for an app|
|nano [file name]||display and edit text files|
|apt show||view package information|
|$||execute a macro|