Use whichever method you are more comfortable with - NOOBS or RASPBIAN - to install and load the image onto a MicroSD card.
In my case I am using Raspbian Stretch Lite. Downloaded and unzipped the image, and then used the Disks utility in Ubuntu Linux to restore the image onto the SD card.
2
Enable Ethernet over USB emulation (Pi Zero W only).
This step is only applicable to Raspberry Pi Zero W, as Pi 3 does not have a USB OTG port.
Additionally, if you have a monitor and keyboard connected to your Pi Zero W, you can also skip this step.
Otherwise, with your SD card plugged into the PC, modify/create the following files:
a) Go to the boot partition, open the config.txt file and add the following at the very end:
dtoverlay=dwc2
b) Next, open the cmdline.txt file and add the following at the end of the line:
modules-load=dwc2,g_ether
c) Create an empty file called ssh.
3
Log into the Raspberry Pi.
If you have a monitor and keyboard connected, simply log into the Pi with username pi and password raspberry.
Otherwise, if using Ethernet over USB emulation (Pi Zero W only), do the following:
a) Make sure Avahi/Bonjour service is running. If you are on Mac or Linux, it most likely is. On Windows, download and install iTunes - it comes bundled with Bonjour.
b) Connect the Pi to your PC via USB cable. Use the USB port labelled "USB" on the Pi (not the "PWR IN" one).
c) Open a terminal application in your PC and log into the Pi using ssh (use PuTTY or similar on Windows):