Skip to main content

How to access Termux's internal directory from file manager

·
Categories Smartphones Termux Tutorials
Table of Contents

Termux can access Android’s internal storage, but it cannot execute programs there directly. You have to move them to Termux’s home directory first.

So what about accessing Termux’s home directory the other way around? After Android 11, file managers can no longer see Termux’s home directory. At this point, you can use the “add external storage” method to access files in Termux’s home directory from your phone’s file manager.

The following is about Termux’s home directory. If you want to access Termux’s internal files, such as Proot-distro, you will need root privileges.

Termux’s internal files are located at /data/data/com.termux. For details, see: Termux File Management

1. Let Termux access the Android phone’s internal storage
#

  1. Open Termux and run the following command:
termux-setup-storage
  1. A dialog will pop up. After you allow access to the phone’s internal storage, Termux will bind mount the phone’s internal storage to the storage directory. Under storage there are several common directories; for example, downloads is the phone’s Downloads directory, while shared is the entire internal storage of the phone.

  2. Example: move foo.sh from the phone’s Downloads directory to Termux’s home directory:

mv storage/shared/downloads/foo.sh ~

2. Access Termux’s home directory from the phone file manager
#

  1. Download Material Files from F-Droid.

  2. After opening it, tap the left sidebar, add storage, and add external storage.

  3. The phone’s built-in file picker will pop up. Select Termux in the left sidebar, then tap Use this folder.

  4. This adds a termux shortcut to the sidebar. From now on, you can freely access Termux’s directory through this shortcut.

Related


Thank you for reading. Public comments are not available on this website. I write to explore ideas honestly, not to chase social engagement or traffic. I would be glad to hear your thoughts after reading the article with care. If you found any errors, technical issues, or would like to share feedback, feel free to contact me via the email listed on the About page.