How to access Linux files on iOS and Android
Network sharing is a really easy way to share files, folders, or entire drives between devices on the same network. But once you've set up network sharing, you also need to know how to access those files.
Learn how to access your Linux files on Android and iOS using network sharing.
Set up file sharing over the network on Linux
To start network sharing on Linux, you need to install and set up the Samba service. You can use the default package manager of your Linux distribution to install Samba.
On Ubuntu/Debian derivatives use:
sudo apt install samba
On Arch-based systems, run:
sudo pacman -S samba
On Fedora, CentOS, and Red Hat Enterprise Linux, run:
sudo dnf install samba
Installation alone is not enough, you will need to configure Samba properly to set up and access shareable drives and folders on your Linux system.
You should go through this guide on how to install and configure Samba on Linux.
SMB is a vulnerable protocol, and Samba servers are a lucrative target for threat actors. Once you've set up your Samba server, you should know the best ways to secure your Samba server from cyberattacks.
How to access Linux files shared over the network from Android
You have now set up Samba and created a shared network drive. Next, you need to connect your Android phone to the same network as your Linux system. When both are on the same network, follow these steps to share files between Android and Linux:
- Turn on the Files app on your Android device. Then, scroll down to Network Storage and tap on it.
- Inside Network Storage , click Add network storage . It may ask you to choose an option from a list of protocols. Tap Network Drive or any option with SMB in the name.
- Your device will start scanning local shared drives. Wait for it to locate your shared drive. If your device cannot locate the drive, follow the next steps.
- First, you need to find the IP address of your Linux system. After writing down the IP address, go back to your Android device and tap on Add Manually .
- In the new window, enter the IPv4 address you copied earlier in the Address field. Then enter 445 in the Port field . Finally, fill in the Username and Password fields with your account credentials and tap Add or Connect .
How to access Linux files shared over the network from iOS
The steps to access Linux files from iOS are identical to those required to access Linux from an Android device.
First, get the IPv4 address of the Linux system. To do so, fire up a new terminal and enter ifconfig. It will return output related to the Linux system's network settings. From the output write down the IPv4 address in the inet field. It will most likely be something like "192.168.1.10".
In case you get the "ifconfig command not found" error , you can also use the ip a command instead. Once you have the IPv4 address of the Linux system hosting the drive, follow these next steps to connect to the drive from your iOS device:
- Turn on the Files app on your iOS device.
- Click the three horizontal dots (ellipses) in the upper right corner. From there, select Connect to Server .
- A new window will open asking you to enter the IP address of the shared drive. Enter the IP address you wrote down earlier and click Next .
- You will then be prompted to enter your user account credentials to access the shared drive. Enter them and click Next .
You should now be able to view the files on the shared drive. Now you can download, upload or modify files locally on your Linux system easily.
You should read it
- How to access Linux files on Windows 10
- How to access Linux server from Android
- Distribute file access with chmod command
- How to Get Full Root Privileges in Linux
- How to access Linux Ext4 partition from Windows
- File Management in Unix / Linux
- Is it possible to run .exe files on Linux?
- How to limit access to su command in Linux
- How to use pandoc to convert files on Linux
- File permissions / access mode in Unix
- How to create new files in Linux
- How to Create ISO Files on Linux