About Me

header ads

List of Basic Commands for Termux

List of Basic Commands for Termux:

Below is a list of basic commands that you can use in Termux. Feel free to practice them and get familiar with their functionality. If you have any questions or ideas, please leave a comment and I'll be happy to assist you.


Note: If any part of the command is green, it signifies a variable. The green portion of the code will change depending on the situation.

1. Update all of the applications and dependencies hooked up at the gadget:

   - Command: apt update && apt upgrade

   - This command will check for available updates and ask you whether you want to upgrade or not. To proceed with the update, type 'Y'.


2. Grant storage permission:

   - Command: termux-setup-storage

   - This command allows you to access your storage and all the folders within it using Termux.


3. Know which directory you are in:

   - Command: pwd

   - This command will display your modern-day running listing.


4. List all the files and directories:

   - Command: ls

   - This command will show you all the folders and files in your current working directory.


5. Move forward in directories:

   - Command: cd [folderName]

   - This command allows you to move into a specific folder. Replace '[folderName]' with the name of the folder you want to move into.


6. Move backward in directories:

   - Command: cd ..

   - Use this command to go back to the previous directory you were in.


7. Clear the screen:

   - Command: clear

   - This command clears all the previous results from the Termux screen.


8. Create a folder or directory:

   - Command: mkdir [folderName]

   - This command creates a new folder. Replace '[folderName]' with the desired name of the folder.


9. Delete an empty folder or directory:

   - Command: rmdir [folderName]

   - Use this command to remove an empty folder. Replace '[folderName]' with the call of the folder you need to delete.


10. Delete a non-empty folder or directory in Termux:

    - Command: rm -rf [folderName]

    - Be cautious when using this command as it will delete a folder and all the files and folders within it. This command is useful when you want to delete a project downloaded from GitHub.


11. Copy a file from one directory to every other:

    - Command: cp [fileName] [destinationPath]

    - You can use this command to copy a file to a specific directory. Replace '[fileName]' with the name of the file you want to copy, and '[destinationPath]' with the path of the directory where you want to copy the file.


12. Search for a specific package in Termux:

    - Command: pkg search [packageName]

    - This command will show you all the packages related to the specified package name.


13. List all the available packages in Termux:

    - Command: pkg list-all

    - It will display a list of all the packages available in the APT repository of Termux.


14. Install a package:

    - Command: pkg install [packageName]

    - You can install any package from the list by typing this command. Replace '[packageName]' with the name of the package you need to install.


15. Uninstall a package:

    - Command: pkg uninstall [packageName]

    - Use this command to uninstall a package from the list. Replace '[packageName]' with the name of the bundle you need to uninstall.. You will be asked for confirmation, so type 'y' to proceed with the uninstallation.


16. Install Python in Termux:

    - Command: pkg install python

    - This command installs Python in your Termux. After installation, you can write and run your own Python scripts. To check if Python is properly installed, type 'python' in the Termux terminal.


17. Install Git in Termux:

    - Command: pkg install git

    - Installing Git allows you to download projects from GitHub.


18. Download projects from a GitHub repository:

    - Command: git clone [projectLink]

    - To download a project from a GitHub repository, use this command and replace '[projectLink]' with the link of the project you want to download.


19. Check all of the walking techniques in Termux:

    - Command: top

    - This command shows you all the tasks currently running in your Termux. To exit the 'top' command, press 'CTRL+C' on your keyboard.


20. Create a text file in Termux:

    1. First, download the 'nano' package by typing 'pkg install nano' in Termux. Confirm the installation by typing 'y'.

    2. Type nano in the terminal.

    3. Enter any text you want (e.g. "Hello, World!").

    4. Press 'CTRL+X' and then 'Y' to save the file.

    5. Give the file a name with the extension '.txt' (e.g. 'example.txt') and press 'enter'.

    6. Use the 'ls' command to see the list of files in your directory.


21. View the contents of a text file:

    - Command: cat [fileName]

    - This command will print the contents of the specified text file on the Termux terminal. Replace '[fileName]' with the name of the report you need to view.

22. Delete a file in Termux:

    - Command: rm [fileName]

    - To delete a file within a directory, type this command followed by the name of the file you want to delete.


23. List all the hooked up packages in Termux:

    - Command: dpkg --list

    - This command displays a list of all the installed packages in your Termux app.


By using these commands, you will be able to navigate, manage files, and perform various operations within your Termux app.

Post a Comment

0 Comments