How to make Internet work in Raspberry Pi(RPi) by USB Tethering
USB Tethering will not work with initial default configuration of the USB port in RPi. We need to enable the network interface for the USB port to make the internet work with USB tethering. Follow the below steps to make internet work with USB tethering.
Note: Take backup of the file before you edit
Steps:
1. Boot Raspberry Pi
2. In the start up screen enter the following command to open the file “interfaces”
> sudo vi /etc/network/interfaces
sudo will execute the command with administrator privileges
This will open the file “interfaces” in the location /etc/network
3. Add the following line “iface usb0 inet dhcp” below
auto eth0
iface eth0 inet dhcp
The modified code will look like
auto eth0
iface eth0 inet dhcp
iface usb0 inet dhcp
4. To save the file press the following keys
ESC
:wq
ENTER
5. Now enter the following command and press ENTER key
>sudo ifup usb0
Now you will see some auto generated commands on the screen
ifup command will bring a network interface up
6. Reboot Raspberry Pi by executing the command
>sudo reboot
7. Enjoy!!!
Test Configuration:
RPi : Raspberry Pi ModelB
RPi OS : Raspbian “wheezy” OS
Mobile OS : Sony Ericsson Xperia Mini Pro (Android Ice Cream Sandwich)