Termux is one type of linux, so most of commands are same in termux and linux. Let's see basic temrux commands one by one.
1. Command for show list of files in directory.
ls
ls = list of files or folders. This command will shows you list of available files and folders in your directory.
ls -a
If you type 'hyphen a' after 'ls' command it will shows list of hidden files in your directory.
2. Command for change directory.
cd
cd = change directory. This command is useful for change directory in your termux or go into particular directory in termux.
For use 'cd' command you must have to specify name of directory after 'cd'. eg : If you want to go into 'storage' directory you have to type command,
cd storage
For go to home directory of termux you have to type '$HOME' after 'cd' command
cd $HOME
3. Command for print current working directory.
pwd
pwd = print working directory. This command is useful for find address of your current working directory. This command will print address of your directory.
4. Command for create new directory in termux.
mkdir
mkdir = make directory. This command is useful for make new directory in termux.
For use this command you must have to define name of directory with 'mkdir' command. eg : If you want to create new folder named as 'TermuxTool' you have to type command,
mkdir TermuxTool
5. Command for remove directory in termux.
rmdir TermuxTool
rmdir = remove directory. This command is useful for remove directory in termux. You must have to specify name of directory after 'rmdir' command.
This command will only works for remove empty directories.
6. Commands for remove files and directories.
rm filename.txt
rm = remove. This command is useful for remove files in temrux. This command is only for remove files it won't work for remove directory. Also you have to specify name of file after 'rm' command.
rm -r TermuxTools
rm -r = remove directory with files. This command is useful for remove or delete directory with all files in directory.
rm -rf TermuxTools
rm -rf = forcefully remove directory with files.
7. Commands for give permission to file or directory.
chmod
chmod = change mode. This command is useful for give running permission to perticular scripts or files.
chmod +x script.sh
This command is useful for give permission to perticular script like 'script.sh'.
chmod +x *
This command is useful for give permission to all files which available in your directory. In this command you don't need to specify name of file.
chmod 777 TermuxTool
This command is useful for give all permission to directory with all files in directory. Full Access !
8. Commands for copy file in termux.
cp filename path
cp = copy. This command is useful for copy perticular file and paste to perticular location.
For use 'cp' command you must have to specify file name after 'cp' and after filename you have to specify path where you want to paster this file.
eg : If you want to copy 'wordlist.txt' file and paste it into '/data/data/com.termux/files/home' path you have to type following command. You can find path name by 'pwd' command.
cp wordlist.txt /data/data/com.termux/files/home
9. Command for move file in termux.
mv filename path
mv = move. This command is useful for move perticular file to perticular location.
Use of 'mv' command is same as 'cp' command.
10. Command for rename any file or directory in termux.
'mv' command is also used for rename files in temrux.
eg : If you want to rename 'script.sh' file to 'install.sh' you have to following command.
mv script.sh termux.sh
After mv command type original name of file then type name that you want to rename.
11. Command for clear temrux screen.
clear
This command is useful for clear text from screen.
12. Command for exit termux session.
exit
This command is useful for close termux. If you are running more than one temrux session you have to type this command multiple time for exit termux.
If you want to stop or close perticular running script or tool you have to press Ctrl+C button. You will find 'Ctrl' button at below termux and above keyboard.