sudo nano /boot/config.txt
#USB gadget mode
dtoverlay=dwc2
rootwait
sudo nano /boot/cmdline.txt
modules-load=dwc2,g_ether
Other params are possible for IP-Address ore more
g_ether.host_addr=00:01:02:03:04:05 g_ether.dev_addr=00:01:02:03:04:06
ssh rapberrypi.local
sudo nano /etc/network/interfaces
*************************************
auto lo
iface lo inet loopback
allow-hotplug usb0
iface usb0 inet static
address 192.168.0.XXX # whatever IP address you want the pi zero to occupy however it must not clash with the IP’s currently on the network or the ones which the DHCP assigns.
netmask 255.255.255.0
network 192.168.0.0 # the base IP of your network
broadcast 192.168.0.255 # whatever your broadcast #address is
gateway 192.168.0.1 # gateway IP for your network
nameserver 8.8.8.8 # google nameserver
dns-nameserver 8.8.8.8 8.8.8.4 # google dns servers
***************************************