The easiest way to get acces to your RPI Zero is via the USB OTG port. The mini USB adapter on the Zero can function as a network adapter. By connecting the RPI Zero to a Linux, Mac or Windows computer you can ssh to it via the raspberrypi.local hostname. But this is not enabled by default. You need to follow the next steps to be able to:

Put a lite or full version of Raspbian on a SD card. You can use Etcher for that. You need to edit config.txt and cmdline.txt which can be found on the boot partition.

Edit config.txt and add the following line:

dtoverlay=dwc2

It should look like this:

config.txt

Save the changes.

Next editcmdline.txt. Add the following line directly after rootwait:

modules-load=dwc2,g_ether

It should look like this:

cmdline.txt

Save the changes.

To be able to ssh into the RPI Zero add an empty ssh file in the root of the boot partition.

This should be it. Put the SD card in the Raspberry Pi Zero, connect it to the USB connector on the RPI Zero and reboot. Type the following on the command line to connect to the RPI Zero:

ssh pi@raspberrypi.local

Windows should now install a new network driver called “RNDIS/Ethernet Gadget”. On Windows you need to do a bit more configuration. To find raspberrypi.local you need to install the Bonjour 2.2 drivers, which are not the latest drivers. The latest drivers are automatically install if you install ITunes. If you do not want to install ITunes you can extract the contents of the installer and find the Bonjour drivers in the extracted content.

The following script can be used for installing a Node version on a Raspberry Pi and other Linux distros also if you want to (Open-mouthed smile). The script makes one assumption: the NodeJs installation file ends with .tar.gz. It does not support files ending .tar.xz.

You use it as follows:

  • Goto https://nodejs.org/dist
  • Choose the version you want to install, i.e. v5.2.0
  • Choose the node installation file you want to install on your Raspberry, i.e. node-v5.2.0-linux-armv6l.tar.gz
  • Run the script like this: install-latest-node.sh v5.2.0 node-v5.2.0-linux-armv6l.tar.gz

This is the script:

I hope you find this script usefull.