The Termux app is a terminal emulator. If I create a file or a folder there, and then use another file explorer app to browse my device, where can I find these files?
You don't need to root your device. All you need to do is run the following command on a non-rooted (or rooted) device to allow termux to access your existing directories, particularly
this creates a new directory in termux,
~/storage, which contains simlinks to
/storage/emulated/0 and can be accessed by a standard gui file manager.
You will need to grant file access to termux when prompted after you run the command.
The default directory is:
Since Termux supports bash commands, user can run
pwd to print current working directory.
pwd is an acronym of print working directory.
Provided that you don't want to root your phone, it is possible to change permission for Termux (Settings->Applications->Termux->Permissions) and enable the Storage permission.
This way you are granted access to phone and sdcard storage and you can use it as superuser (mv, ls and other commands work as intended) in the application.
So, you can move or copy the files you need into internal storage.
Termux has its default directory that's inaccessible to newbies. To verify this, on the CLI, type
data/data/com.termux/files/home should appear.
To be able to manipulate your Android directory from Termux, on your Android device, go to Settings - Apps - Termux - Permissions - tap "Storage" on.
Now on the CLI, in Termux, type
$ cd /storage/emulated/0 $ pwd
/storage/emulated/0 should appear.
You can as well create a new file in your local storage, type
$ echo hello world > MyFirstTermuxFile.txt
That's it. You can now play with your local device storage.
You can touch it on
data/data/com.termux/files/home. That's the default main directory of Termux.
It's impossible to find the file that you've created on Termux main directory as I mentioned above on your phone because it's not rooted on any device.
It works as sort of a server. By thereon
data/data/com.texmux/files/home, which is the default main directory of Termux, you can already browse files, create files, manipulating them the same sort you're using your file manager
You can view it easily with Material file manager. https://www.learntermux.tech/2020/10/Termux-File-Manager.html Here is a guide I found useful to me.