#!/linuxSucks/Raspberry Pi Zero W Ethernet Gadget
Jan 14, 2019Note that even though it’s called “Ethernet Gadget” you do not use an Ethernet cable! The only cable is the USB micro-B cable from your computer to your Pi Zero. The Pi ‘appears’ like an Ethernet device.
Step 1. Edit config.txt
Use a text editor to open up the config.txt file that is in the SD card. Go to the bottom and add and save it:
dtoverlay=dwc2
Step 2. Edit cmdline.txt
Open up cmdline.txt After rootwait (the last word on the first line) add a space and then add:
modules-load=dwc2,g_ether
Exit and save the file.