How to access Linux files on iOS and Android

Sometimes, you may want to access Linux files from your Android/iOS device without using USB or any wired media.

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.

How to access Linux files on iOS and Android Picture 1How to access Linux files on iOS and Android Picture 1

 

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:

  1. Turn on the Files app on your Android device. Then, scroll down to Network Storage and tap on it.
  2. 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.
  3. 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.
  4. 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 .
  5. 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 on iOS and Android Picture 2How to access Linux files on iOS and Android Picture 2

 

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:

  1. Turn on the Files app on your iOS device.
  2. Click the three horizontal dots (ellipses) in the upper right corner. From there, select Connect to Server .
  3. 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 .
  4. You will then be prompted to enter your user account credentials to access the shared drive. Enter them and click Next .

How to access Linux files on iOS and Android Picture 3How to access Linux files on iOS and Android Picture 3

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.

4.5 ★ | 2 Vote