File Management
One of the first things you will notice about ADL is that your files live in two separate worlds: Android's storage and Linux's filesystem. Understanding how these worlds connect is essential for a smooth workflow. This guide covers the Thunar file manager, shared storage between Android and Linux, and the commands you need to move files back and forth.
Thunar File Managerโ
Thunar is the default file manager in XFCE and is already installed if you followed the ADL desktop setup. It provides a graphical interface for browsing, copying, moving, and deleting files inside your Linux environment.
If Thunar is not installed for some reason, add it with:
apt install thunar -yLaunch Thunar from the XFCE application menu under System, or run it from the terminal:
thunarThunar opens to your home directory by default. The left sidebar shows bookmarks and common locations. You can drag and drop files between folders, right-click for context menus, and use keyboard shortcuts just like any desktop file manager.
You can add frequently used directories to Thunar's sidebar bookmarks by dragging a folder into the left panel. This is especially useful for shared storage directories that you access often.
Useful Thunar Featuresโ
- Bulk rename โ select multiple files, then go to Edit > Rename to batch-rename files with patterns
- Custom actions โ right-click > Custom Actions lets you add your own context menu entries, such as "Open Terminal Here"
- Split view โ press F3 to open a second pane, making it easy to move files between directories
- Show hidden files โ press Ctrl+H to toggle visibility of dotfiles (files starting with a period)
How Storage Works in ADLโ
ADL runs Ubuntu inside proot-distro, which itself runs inside Termux on Android. This layered architecture means files are stored in specific places:
- Linux files live inside Termux's private app storage, under the proot Ubuntu filesystem. Android cannot see these files directly.
- Android shared storage (
/sdcard) is where your photos, downloads, and other Android files live. This is what you see in Android's built-in file manager. - Termux home (
~in Termux, outside proot) sits between the two and can act as a bridge.
Because the Linux filesystem lives inside Termux's private storage, Android apps and file managers cannot browse your Linux files. To make a file visible to Android, you need to copy or move it to shared storage.
Setting Up Shared Storageโ
Before you can access Android's files from Termux (and by extension from Linux), you need to grant Termux storage access. Run this command in Termux, outside of proot:
termux-setup-storageAndroid will prompt you to grant file access. Accept the permission. This creates a set of symlinks in your Termux home directory at ~/storage/:
| Symlink | Points to | Contains |
|---|---|---|
~/storage/shared | /sdcard | All of Android's shared storage |
~/storage/downloads | /sdcard/Download | Your Android downloads |
~/storage/dcim | /sdcard/DCIM | Photos and screenshots |
~/storage/music | /sdcard/Music | Music files |
~/storage/movies | /sdcard/Movies | Video files |
~/storage/pictures | /sdcard/Pictures | Image files |
You must run termux-setup-storage from Termux itself, not from inside proot Ubuntu. If you run it inside proot, it will not work. Exit proot first by typing exit, run the command, then re-enter proot.
Moving Files Between Android and Linuxโ
There are several ways to transfer files between the two environments. Choose the method that fits your situation.
Method 1: The shared-tmp Directoryโ
The simplest approach is to use the shared temporary directory. When proot-distro runs Ubuntu, it bind-mounts a shared directory that both Termux and proot can access. The exact path depends on your setup, but it is typically available at /tmp inside proot, which maps to Termux's tmp directory.
To copy a file from Linux to a location Android can see:
cp /home/user/myfile.txt /tmp/myfile.txtThen in Termux (outside proot), move it to shared storage:
cp ~/tmp/myfile.txt ~/storage/shared/Method 2: Direct Access via Termux Homeโ
From inside proot Ubuntu, you can often access Termux's home directory through a mount point. The path varies, but it is commonly at /host-rootfs/data/data/com.termux/files/home or a similar bind-mounted location. If your setup uses --bind options, check where Termux's home is mounted.
Create a dedicated folder for transfers to keep things organized. Make a directory like ~/transfer in your Termux home directory, and access it from both sides.
In Termux (outside proot):
mkdir -p ~/transferThen start proot with a bind mount that makes this directory visible inside Ubuntu. If you are using a launch script, add the bind option to map it to a convenient path.
Method 3: Termux Shared Storage from Inside Prootโ
If your proot launch script bind-mounts Termux's storage directory, you can access Android's shared storage directly from inside Linux. The ADL guides set this up for you. Check whether /sdcard or a similar path exists inside your proot environment:
ls /sdcardIf this shows your Android files, you can copy directly:
cp /home/user/document.pdf /sdcard/Download/The file will immediately appear in Android's Downloads folder and be visible in any Android file manager.
If /sdcard is not available inside proot, you can add it by modifying your proot launch command to include --bind /sdcard:/sdcard. Check your ADL launch script for details.
Accessing Linux Files from Androidโ
This direction is more limited. The Linux filesystem lives deep inside Termux's private application storage, which Android protects from other apps.
You cannot browse Linux files directly from Android's file manager. Instead, you need to copy any files you want to access on the Android side into shared storage first, using one of the methods described above.
For quick access to a specific file:
cp /home/user/myfile.txt /sdcard/Download/This is a one-way copy, not a sync. If you edit the file in Linux after copying, the copy on the Android side will not update. You need to copy it again.
File Permissionsโ
Linux uses a permission system that controls who can read, write, and execute files. You will encounter this when files refuse to open, scripts will not run, or you get "Permission denied" errors.
Every file has three permission types:
| Permission | Letter | Number | Meaning |
|---|---|---|---|
| Read | r | 4 | View the file's contents |
| Write | w | 2 | Modify or delete the file |
| Execute | x | 1 | Run the file as a program or script |
These permissions apply to three groups: the owner (you), the group, and others (everyone else).
Viewing Permissionsโ
List files with their permissions using:
ls -laThe output looks like this:
-rw-r--r-- 1 user user 1024 Jan 15 10:30 document.txt
drwxr-xr-x 2 user user 4096 Jan 15 10:30 myfolder
The first column shows permissions. For document.txt: the owner can read and write (rw-), the group can read (r--), and others can read (r--).
Changing Permissions with chmodโ
The chmod command changes file permissions. The most common uses:
chmod +x script.shThis adds execute permission, allowing you to run a script. Other useful examples:
chmod 644 document.txtThis sets read/write for the owner and read-only for everyone else (6 = read + write, 4 = read).
chmod 755 myscript.shThis sets full permissions for the owner and read/execute for everyone else. Use this for scripts and programs.
Use 644 for regular files (documents, images, config files) and 755 for scripts and executables. Avoid using 777 (full access for everyone) as it removes all access controls.
Changing Ownership with chownโ
If a file is owned by the wrong user, you can change ownership:
chown user:user filename.txtReplace user with your actual username.