[BeagleBone Black] Enable USB Internet Sharing from Windows

Now that we boot Debian from a MicroSD card and expand its file system capacity, the final step to complete setting up is to share Internet from my main computer. I got a windows computer, so I will do it from there. Instruction to other platforms should be similar.

If you rather watch a video, I pretty much follow this video, it helps a lot! I really need to thanks the people (in this case a professor) who share their knowledge for the good of everyone!

1. Open Control Panel -> Network and Internet -> Network and Sharing Center 

2. One the left side panel, click Change Adapter Settings

3. Now, this should show all the network adapter available on the computer. Here’s mine, the one on the left is the BeagleBone Black, you can tell by the description Linux USB Ethernet. And the one on the right is my Internet source, a wireless adapter.


4. Here, we are going to enable Internet Sharing on Windows’ side by right clicking on your Source Internet Adapter. In my case, Wireless Network Network Connection, then Properties. Click Sharing, check Allow other network user to connect… and then select the BeagleBone network adapter from the drop down menu.

internet sharing

5. So after doing this, Windows will reconfigure the IP address for the BeagleBone, we need to set this back to automatic. Right Click on BeagleBone Network -> Properties -> highlight Internet Protocol Version 4 (TCP/IPv4) ->  click Properties -> mark both Obtain IP and DNS server adress automatically.


6. We are all set on the Windows side, now we need to configure the BBB the route the Internet through your main computer. We do this by connect to BBB through SSH like before. Since we need to do this step every time we start up again, we might as well right a script using the nano editor. We will call this file EnableUSBInternet.

 nano EnableUSBInternet

Write the following into the script… basically, it route the internet to the pc, who’s address is, while the BeagleBone’s IP is

echo "Routing Default Gateway to"
sudo /sbin/route add default gw

echo "USB Internet Sharing Enabled!"

usb internet setting

Ctrl + X to exit, press Y to save and press Enter to confirm to file name.

7. Use the clear command to clear the terminal for better view. Type in ls -l to list the files available in the current directory.

ls -l

This pretty much show everything in the current directory. What we concern ourselves here is the EnableUSBInternet file, the left side -rw-r–r– list the permission. Right now, we can write, read, but we can’t execute the file. Therefore, we need to use the following command to change the permission to allow execution.

 chmod +x EnableUSBInternet

We can see now that the file is executable with the different color and the “x” permission indicator.


8. Finally, we just need to run this script to set up Internet. Remember to run this script every time during start up to get Internet.


We can confirm that we actually got Internet access by pinging google, do Ctrl+C to exit pinging process.

 ping www.google.com

ping google

9. Okay, since it’s annoying having to hand launch this script every time we start up, why not make it automatic? Therefore, we going to make edit to the .bashrc file and have it launch the script whenever we log it.

 sudo nano .bashrc

Scroll all the way down and add the following line:


Ctrl+X -> Y -> Enter to save the file. Now, just reboot and it will launch when we log in!


BeagleBone Black Setup Series


4 thoughts on “[BeagleBone Black] Enable USB Internet Sharing from Windows

  1. Pingback: [BeagleBone Black] Boot Debian OS from Image | Billwaa's Blog

  2. Pingback: [BeagleBone Black] Expand File System Capacity on the MicroSD | Billwaa's Blog

  3. Pingback: [Beaglebone Black] Enable On-Board Serial UART | Billwaa's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s