Skip to content

Instantly share code, notes, and snippets.

@connorjan
Last active March 18, 2017 19:53
Show Gist options
  • Save connorjan/de1c36016e25463eb99f2e699bec2d30 to your computer and use it in GitHub Desktop.
Save connorjan/de1c36016e25463eb99f2e699bec2d30 to your computer and use it in GitHub Desktop.
Setting up Ethernet over USB on a Raspberry Pi Zero

How to enable Ethernet/SSH over USB on a Raspberry Pi Zero

  1. Flash the latest kernel onto an SD card using the instructions here: https://www.raspberrypi.org/documentation/installation/installing-images/README.md

  2. Mount the SD card and browse to the boot partition using a file browser

  3. Enable the USB controller by opening up the config.txt file and adding a new line which contains the following: dtoverlay=dwc2

  4. Enable the ethernet gadget driver by opening up the cmdline.txt file and add the following text to the end of the line: modules-load=dwc2,g_ether

  5. Enable SSH connections by creating a new file named ssh (make sure there is no file extension) in the root directory of the boot partition (the same directory where the previous two files are located). This can easily be done by simply copying the cmdline.txt file (or any other file) to the same directory and then renaming it to ssh and then removing the text from within it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment