How to share a mobile connection from any smartphone to Linux

What if you need to keep your Linux computer online but don't have wireless or Ethernet? The answer is to use tethering. With your smartphone, you can share mobile Internet with your computer.

Laptops are always limited to WiFi connections; desktop computers never have integrated mobile internet. What if you need to keep your Linux computer online but don't have wireless or Ethernet?

The answer is to use tethering. With your smartphone, you can share mobile Internet with your computer.

As long as your service provider doesn't limit how you use your data, sharing an Internet connection (also known as netshare) with your Linux computer is a good option. WiFi connection sharing is an option. Here's how to use the USB tethering feature on Linux with Android and iPhone.

How to share an Android phone connection with Linux

If you have an Android device, sharing your connection is simple, thanks in part to both Linux phones and phones.

If you want to share your Android connection with Linux via a USB cable, do the following:

1. Connect the USB cable to the phone and Linux PC.

2. Android will detect the connection, when prompted to allow access, select Allow.

3. In Notifications , find the USB notification and touch it.

4. In Use USB for , select USB tethering.

Picture 1 of How to share a mobile connection from any smartphone to Linux
How to share an Android phone connection with Linux

In most cases, the connection will be established automatically. Check the device's IP address to confirm that it is working, using ifconfigor ip address. Look for the option labeled usb0.

Picture 2 of How to share a mobile connection from any smartphone to Linux
Find options labeled usb0

For some distributions, you may need to choose a USB connection.

1. On a Linux system, find the network tray applet.

2. Click here to find a network option called auto usb0.

3. Select this option to connect Linux to the phone via a USB cable.

If you don't have a tethering data plan, installing custom Android ROMs can help avoid restrictions.

Readers can also refer to the article: Instructions for accessing the Internet via phones running Android for more details.

Share connection on BlackBerry device?

Depending on the age of the BlackBerry device you own, there are several options for connecting it to a Linux system. If you have a BlackBerry, it will run:

  1. Android (since 2015)
  2. BlackBerry 10 (2013 - 2018)
  3. Blackberry 7.0 operating system (2011 - 2013)

For BlackBerry devices running Android, refer to the section above. For BlackBerry 10 and BlackBerry OS 7.0, see the section below.

To share your phone connection via USB running BlackBerry 10, start by connecting your device to a computer. Later:

1. Open Settings> Network Connections> Internet Tethering .

2. Click Connect.

3. Select USB.

4. Enable Internet Tethering.

For phones running the older BlackBerry operating system:

1. Click Manage Connections> Network and Connections .

2. Find Mobile Hotspot Connections .

3. Set up network information.

Whichever method you use, select the usb0 network in your Linux console, if it doesn't connect automatically.

How to share iPhone connection with Linux

If you own an iPhone with tethering, you can set up a USB connection.

However, unlike Android, the iPhone does not connect automatically. Instead, you'll need libimobiledevice , described as a cross-platform software protocol library to communicate with iOS devices. Go to www.libimobiledevice.org to confirm current compatibility.

If you use Ubuntu, libimobiledevice is already installed. If not, before sharing your iPhone connection with Linux, open a terminal and enter:

sudo apt install libimobiledevice6

To connect to the Internet via iPhone:

1. Open Settings> Personal Hotspot .

2. Activate Allow Others to Join .

Picture 3 of How to share a mobile connection from any smartphone to Linux
Share iPhone connection with Linux

All you need to do now is choose the connection in Linux. Unlike Android, iPhone devices appear as new Ethernet devices, instead of USB. So look for eth0 or eth1 , but usually eth1 , because eth0 should be assigned to the Ethernet port.

Picture 4 of How to share a mobile connection from any smartphone to Linux
Find eth0 or eth1

Share your Linux phone connection with Linux

Several Linux mobile operating systems are available. These include a mobile version of Pure OS on Librem 5, PostmarketOS on PinePhone and UBPorts, a continuation of Ubuntu Touch.

Surprisingly, not all of these devices have reliable options for USB or wireless tethering. For specifics, check the documentation of any Linux mobile project you're using.

Update 08 May 2020
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile