20+ Basic Termux Commands: Essential List for Beginners

In my previous post, I explained what Termux is and its capabilities. It is a powerful Linux terminal environment for Android, and mastering it requires learning fundamental commands.

Before you begin, ensure you have followed the How to Install Termux on Android guide. Without knowing these basic commands, you will face difficulties managing files and scripts.

Essential Directory and Navigation Commands

1. Change Directory (cd)

To move from your current folder to another, type:

$ cd <folder_name>

Example: cd botnet

2. Move Up One Level

To move back to the parent directory:

$ cd ..

3. Go to Home Directory

To return to the Termux home path immediately:

$ cd ~

4. Check Current Working Directory (pwd)

To find out which directory you are currently in:

$ pwd

Terminal and File Management

5. Clear Terminal Screen

To clean the terminal screen without stopping background processes:

$ clear

6. Reset Terminal

To clear the screen and stop all active processes:

$ reset

7. List Files and Folders (ls)

To see all files and folders in your current location:

$ ls

8. Delete Folders and Files

To delete a folder that contains files (non-empty):

$ rm -rf <folder_name>

To delete an empty folder or a single file:

$ rm <filename>

9. Create a New Directory (mkdir)

$ mkdir <folder_name>

Permissions and Package Management

10. Grant Storage Permission

To access your phone\'s internal storage within Termux:

$ termux-setup-storage

11. Update and Upgrade Packages

Keep your environment secure and functional. Learn how to fix and update Termux regularly:

$ apt update && apt upgrade

12. Install New Packages

You can find a list of basic packages Termux must have and install them using:

$ pkg install <package_name>

13. Cloning from GitHub

To download scripts from GitHub, install git first and then clone:

$ pkg install git
$ git clone <script_url>

Frequently Asked Questions

FAQ about Termux Commands

Q: How do I list files in Termux?
A: Use the ls command to list all files and folders in your current working directory.

Q: How can I update Termux packages?
A: You can update all installed packages by running the command: apt update && apt upgrade.

Q: How do I grant storage permission in Termux?
A: Run the command termux-setup-storage and allow the prompt to give Termux access to your internal storage.

Q: How do I delete a folder in Termux?
A: To delete an empty folder, use rm foldername. To delete a non-empty folder, use rm -rf foldername.

Q: How do I stop a running process in Termux?
A: You can stop any active process by pressing Ctrl+Z or Ctrl+C on your terminal keyboard.

Devesh Singh

I am Devesh Singh, Student in Varanasi India . I like to write blog on technology and ethical hacking and other tricks or solutions to problem that anyone face during using technology and Internet.

Post a Comment (0)
Previous Post Next Post