Advertisement
Ben_salam

Termux Commands

Jun 25th, 2020
475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. You can run this command in a sequence to practice and know your self how these commands work on termux.
  4.  
  5. >Note: If any part of the command is green that means it is a variable. The green part of the code will change according to the situation.
  6.  
  7. Update all the packages and dependencies installed on the system:
  8.  
  9. 👉 apt update && apt upgrade
  10.  
  11.  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.
  12.  
  13.  
  14.  
  15. Grant storage permission:
  16.  
  17. 👉 termux-setup-storage
  18.  
  19. now you can access your Storage and all the folder in it using termux.
  20.  
  21.  
  22. Know Which directory you are in:
  23.  
  24.  👉pwd
  25.  
  26. This command will tell you, your present working directory
  27.  
  28.  
  29. List all the files and directories:
  30.  
  31.  👉ls
  32.  
  33. this command will show you the folder and files in your current working directory.
  34.  
  35.  
  36. Move forward in directories:
  37.  
  38. 👉 cd storage
  39.  
  40. 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.
  41.  
  42.  
  43. Move backward in directories:
  44.  
  45.  👉cd ..
  46.  
  47.  by typing cd ..(between cd and .. we have to put space) you will go back in the directory you were in.
  48.  
  49.  
  50. Clear Screen:
  51.  
  52. 👉 clear
  53.  
  54. by typing clear in the termux you can clear all the previous results.
  55.  
  56.  
  57. Create a folder or a directory:
  58.  
  59. 👉 mkdir folderName
  60.  
  61. 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.
  62.  
  63.  
  64.  
  65. Delete a folder or a directory:
  66.  
  67. 👉 rmdir folderName
  68.  
  69. Rmdir stands for Remove Directory.Type rmdir space folder name to remove that folder.
  70.  
  71.  
  72. Delete Non-Empty directory or folder in termux:
  73.  
  74. 👉 rm -rf folderName
  75.  
  76. 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.
  77.  
  78.  
  79. Copy a file from one directory to another directory:
  80.  
  81.  👉cp files-name file-path
  82.  
  83. 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.
  84.  
  85.  
  86.  
  87. Search for the specific package in termux:
  88.  
  89. 👉 pkg search package-name
  90.  
  91. It will show you all the package related to that package name.
  92.  
  93.  
  94. List all the available packages in termux:
  95.  
  96. 👉 pkg list-all
  97.  
  98. it will show you all the packages that are available in the APT repository of termux.
  99.  
  100.  
  101.  
  102. Install a Package:
  103.  
  104. 👉 pkg install packageName
  105.  
  106. you can install any package from the list, just type pkg install package-name.
  107.  
  108.  
  109. Uninstall a Package:
  110.  
  111.  👉pkg uninstall packageName
  112.  
  113. 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.
  114.  
  115.  
  116. Install Python in termux:
  117.  
  118.  👉pkg install python
  119.  
  120. 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 properly installed or not.
  121.  
  122.  
  123. Install Git in termux:
  124.  
  125. 👉 pkg install git
  126.  
  127. Git will allow you to download any project from the github.
  128.  
  129.  
  130. Download projects from GitHub repository :
  131.  
  132. 👉 git clone Link-of-the-project
  133.  
  134. 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
  135. e.g: git clone https://github.com/adi1090x/termux-style.git
  136.  
  137. See what's inside a text file:
  138.  
  139.  👉cat file-name
  140.  
  141. Run this command and everything in the text file will be printed on the terminal.
  142. e.g: cat data.txt
  143.  
  144.  
  145. Delete a file in termux:
  146.  
  147.  👉rm file-name
  148.  
  149. To delete any file within the directory in, just type the rm name of your file and press enter and it will be deleted.
  150. e.g: rm data.txt
  151.  
  152.  
  153. List all the installed Packages in termux:
  154.  
  155.  👉dpkg --list
  156.  
  157. By Using this command You will be able to see all the installed packages in your termux app.
  158.  
  159. John our telegram channel
  160. http://t.me/Learnfreehacking0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement