How to Access Files on Android via New Linux Terminal
Recently, we showed you how to enable the Linux Terminal on your Pixel device . Likewise, we also shared some handy and most commonly used commands that you can use as a stepping stone. So now, let’s make you aware of the steps to access various files on your Android device via the new Linux Terminal. So without any further ado, let’s get started.
- How to Access Files on Android via New Linux Terminal
- How to Access Files Created by Linux Terminal
- How to Use Linux Commands in Pixel Linux Terminal
How to Access Files on Android via New Linux Terminal

To access any files via the Terminal , you have to place them in the Downloads folder, which can then be accessed via the /mnt/shared directory. Any file placed outside of the Downloads folder wouldn’t be accessible by the Linux Terminal, even though the app has all the required permissions.
Moreover, files created or placed in the Downloads folder will be accessible by the Linux Terminal, just cd it to /mnt/shared and you’ll be taken to the Downloads folder where you can have a look at all the files. However, the reverse is not true.
How to Access Files Created by Linux Terminal
Any file created by the Linux Terminal is placed in the /home/droid directory, which might not be accessible via any of your device’s File Manager [though they can be accessed via the cp command, more on that later].
But why is that the case? Well, the Linux Terminal works in a virtual machine via the Android Virtualization Framework. Its directory /home/droid exists inside a secure Linux VM, which is a part of a virtual disk image mounted in the VM. Due to this, Android’s file system and File Manager apps cannot see inside the Virtual Machine’s file system because /home/droid is not part of /sdcard .

Another important point to keep in mind is that if you simply use the ls command, it will list out all the files present in the /home/android directory ; these files might not be visible if you access them via the File Manager app. However, if you use the ls /mnt/shared command , then it will show you all the files present in the actual Downloads folder , which are also accessible via the File Manager.
Now comes the most important point – since the files created by Terminal are stored in the /home/android directory, which is not accessible by File Manager apps, so how can you access these files? Well, you can simply copy those files from /home/droid to /mnt/shared, and the files will be transferred to the Downloads folder, which you can then easily access via the desired files app.
How to Use Linux Commands in Pixel Linux Terminal

Apart from that, the rest of the Linux commands will work without any hiccups. For instance, here are some of the most commonly used commands that you use in the Linux Terminal. NOTE: There are two ways of using these commands
- Add the /mnt/shared/ before the file name: This way, the file will be saved directly in the Downloads folder, which you can access via any File Manager app of your choice. For example, cat > /mnt/shared/test.txt Droidwin will create a test.txt file with Droidwin word and save it in the Downloads folder.
- Directly use the command without specifying /mnt/shared: This way, the file will be saved in /home/droid/ and you wouldn’t be able to access it via the File Manager [due to the reasons explained above]. So you then have to copy the file [via the cp command] from /home/droid and then paste the file in the /mnt/shared directory, which would then be accessible via File Manager. For example, cat > test.txt Droidwin will create a test.txt file with Droidwin word and save it in the /home/droid directory. To copy it to the Downloads folder, use the following command: cp /home/droid/test.txt /mnt/shared
pwd: Prints the current working directory.
cd [directory]: Changes the current directory to the specified path.
mkdir [directory_name]: Creates a new directory.
rmdir [directory_name]: Removes an empty directory.
touch filename.extension: Creates a blank file
cat > filename.extension: Create a new file and add content to it. Hit Ctrl+D to save it.
cat [file_name]: View the contents of a file
cp [source] [destination]: Copies files or directories.
mv [source] [destination]: Moves or renames files or directories.
rm [file/directory]: Deletes files or directories.
clear: Clear the terminal.
touch [file_name]: Creates an empty file.
cat [file_name]: Displays the content of a file.
wget [URL]: Download files from the web.
df: Check the details of a file system.
- How to Install Kali Linux NetHunter on any Android
- Install Kali Linux Nethunter Kernel on Galaxy S20 FE
- Install Kali Linux NetHunter ROM on Redmi Note 10 Pro
- How to Install Kali Linux NetHunter ROM on OnePlus 8/Pro/8T
- Microsoft Edge & Brave not working in Fedora Linux [Fixed]
- Julius Vitorillo 4 months ago Reply History
(Cancel Reply)
Δ