This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Access Internet When Raspberry Pi Is Directly Connected to Computer Using Ethernet

When a Raspberry Pi™ hardware is directly connected to a computer using an Ethernet cable, perform these steps to access the Internet from the hardware.

  1. Connect the Raspberry Pi hardware to a wireless network.

  2. Open a Secure Shell (SSH) command-line session with the hardware using the IP address as This is the static IP address assigned to the hardware during the Hardware Setup process for direct connection.

    r = raspberrypi(‘’,’pi’,’raspberry’); 

    Here, raspberry and pi are the default user name and password of the Raspberry Pi hardware.

  3. From the routing table, delete the default route, The hardware uses this route to access external hosts.

    sudo ip route del
  4. Check if the hardware is now connected to the Internet by executing the ping command on the Google® DNS IP address, A successful response indicates that the hardware is connected to the Internet.


See Also