Skip to main content

Ubuntu Server 16.04 : Connection via USB Android Tethering

As we know that Ubuntu Server by default does not have a GUI. It is certainly quite difficult to make internet connection via USB Android. Here's how to connect internet via USB and have been tried in Ubuntu Server version 16.04 LTS.
  1. Make sure your android phone already has internet connection
  2. Connect your android phone with server via USB cable
  3. From your android phone, click Settings menu -> Wireless and Network -> More -> Tethering & portable hotspot and enable USB tethering
  4. In the ubuntu server terminal, use the command
sudo ifconfig -a

Sample display of this command
enp0s29f7u5    Link encap:Ethernet  HWaddr 08:00:27:38:7b:49  
          inet addr:192.168.201.7  Bcast:192.168.201.1  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe38:7b49/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3593205 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4328737 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:546620528 (546.6 MB)  TX bytes:4023123363 (4.0 GB)

enp3s0f0    Link encap:Ethernet  HWaddr 08:00:27:d6:48:f7  
          inet addr:192.168.2.88  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fed6:48f7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2665611 errors:0 dropped:228 overruns:0 frame:0
          TX packets:2072966 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1742839194 (1.7 GB)  TX bytes:869666434 (869.6 MB)

5. Find your USB ethernet as an example of the above display is enp0s29f7u5. Then type the following command
sudo ifconfig enp0s29f7u5 up

6. To be able to connect, setting IP to DHCP in the following way
sudo nano /etc/network/interfaces

7. Use the following configuration
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# USB
auto enp0s29f7u5
iface enp0s29f7u5 inet dhcp

8. The final step, activate the newly configured network
sudo ifup enp0s29f7u5
 
 Now you are connected to the internet, and try pinging google.com

Comments

  1. You got a really useful blog I have been here reading for about half an hour. I am a newbie and i read about here on your post this is valuable for me. installing phone line | data cable installation


    ReplyDelete
    Replies
    1. Ubuntu Server 16.04 : Connection Via Usb Android Tethering >>>>> Download Now

      >>>>> Download Full

      Ubuntu Server 16.04 : Connection Via Usb Android Tethering >>>>> Download LINK

      >>>>> Download Now

      Ubuntu Server 16.04 : Connection Via Usb Android Tethering >>>>> Download Full

      >>>>> Download LINK YG

      Delete
  2. Great works!!!! Thanks I have a different setup to you and I am trying to use Ubuntu from home studio. ^ND

    ReplyDelete
  3. Instead of an Ubuntu device can use similar commands using another rooted android phone?

    ReplyDelete
  4. Great tutorial, I had to use netplan though but this set me on the right track.

    ReplyDelete
  5. Excellent tutorial. I would like to add this tip: Your phone screen timeout may kill the USB connection and internet on the PC. Either turn off your phone's screen timeout or enable the developer options on the phone and enable Keep Awake. If you have a computer without Wifi, you can turn your phone into a wifi adaptor. I did this with my cellular data connection disabled.

    ReplyDelete
  6. Thanx for such a great tutorial. This helps me alot.

    ReplyDelete
  7. Nice Article, after reading this post i have successfully connected my android phone with the PC via USB. Now, i am also browsing the web pages also. Thanks for sharing this knowledge.

    The Android users are increasing daily and I hope this recovery tool may help the smartphone users which are suffering from data loss and media files deletion from them.

    I would like to recommend you the android data lost users to use Android Data Recovery Software to get easily and in just a few steps they will get back their all lost data from LeMax, Realme, Samsung, Blu Dash, Xiaomi, Huawei, ZTE, Lenovo, Motorola, Oppo, OnePlus, and much more mobile phones also.

    ReplyDelete
  8. after doing this config, the day want to be able to use ethernet cable
    will i have a problem ??

    ReplyDelete
  9. Hii, I recently installed linux but somehow it doesn't have net -tool package, i. e it doesn't have ifconfig and wifi is also disabled can anyone please tell me how to enable wifi or use usb tethering without terminal. ASAP

    ReplyDelete
  10. Hii, I recently installed Linux but somehow it doesn't have net tools package that's why I can't use ifconfig, and wifi os also disabled can anyone pl tell me how to enable wifi /usb tethering without terminal.

    ReplyDelete
    Replies
    1. Did you find a solution? If so please help me out. Im facing the same problem

      Delete
  11. Before purchasing any detox shampoo, determine your hair type because not all shampoos are effective on all hair kinds. If you have dry, frizzy hair, look for a shampoo that is formulated for tough hair and contains nourishing ingredients. The following methods include the top seven detox methods that are convenient and known to bring results. We have also included a few at-home DIY remedies that will make you well prepared for the anticipated day. And then, what excuse would you give your employer or the authorities for having this sudden urge to look like a Sphynx cat? It may make them even more suspicious, and they may ask you to retake the test, i.e. Visit: https://www.urineworld.com/

    ReplyDelete
  12. Ubuntu Server 16.04 : Connection Via Usb Android Tethering >>>>> Download Now

    >>>>> Download Full

    Ubuntu Server 16.04 : Connection Via Usb Android Tethering >>>>> Download LINK

    >>>>> Download Now

    Ubuntu Server 16.04 : Connection Via Usb Android Tethering >>>>> Download Full

    >>>>> Download LINK su

    ReplyDelete
  13. Cool and that i have a super present: How Many Houses Has Hometown Renovated house renovation for sale

    ReplyDelete

Post a Comment

Popular posts from this blog

Autostart VirtualBox VM on Ubuntu Server 18.04 Boot

Create a configuration file in /etc/default/ sudo nano /etc/default/virtualbox then add VBOXAUTOSTART_DB=/etc/vbox VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg Then create a configuration file in  /etc/vbox/ sudo nano /etc/vbox/autostart.cfg then add default_policy = deny # Create an entry for each user allowed to use autostart myusername = { allow = true } sudo chgrp vboxusers /etc/vbox sudo chmod 1775 /etc/vbox sudo usermod -aG vboxusers USERNAME VBoxManage setproperty autostartdbpath /etc/vbox Use the following command to get a list of available vms vboxmanage list vms Create a file with <username>.start on /etc/vbox sudo touch /etc/vbox/username.start sudo chown username /etc/vbox/username.start Restart the virtualbox service for changes to take effect sudo systemctl restart vboxautostart-service Specify the virtual machine that will be set to autostart VBoxManage modifyvm <uuid|vmname> --autostart-enabled...

Auto start VirtualBox guest on system reboot (Ubuntu 16.04)

Here's how to turn on guest OS in VirtualBox automatically when host PC is turned on. In this guide I use Ubuntu 16.04 LTS 64bit and VirtualBox 5.1.22 All we need to do is create a file with the extension * .service and put in the /lib/systemd/system folder. In this guide use the autostartvbox.service file name as an example. sudo nano /lib/systemd/system/autostartvbox.service   The contents of the file are as follows #!/bin/sh [ Unit ] Description = Autostart VBOX Guest on Boot [ Service ] User = your_user ExecStart = /usr/bin/VBoxHeadless --startvm VirtualBox_Guest_Name [ Install ] WantedBy = multi-user.target     allows the service to run when the system boot with the following command sudo systemctl enable autostartvbox.service     If successful then the feedback obtained is as follows Created symlink from /etc/systemd/system/multi-user.target.wants/autostartvbox.service to /lib/systemd/system/autostartvbox.service ...