first run (linux)

First run

Congratulations, your SD card should be now ready for boot! Safely remove your SD card from your computer, and insert it into your Raspberry Pi. There are two USB ports on your Pi 0, labeled as “PWR IN” and “DATA”, see this image:

RPi 0 USB ports RPi 0 USB ports

Insert your USB cable into the “DATA” port, which is shown in the image above, and connect it to your PC. The green LED on your Pi should start blinking quickly for a while, that means it is starting up. In the meantime, you can enable Bluetooth and Hotspot on your phone, so you can get up and running. The process of booting up for the first time can take few minutes or up to tens of minutes depending on your SD card and your pwnagotchi’s CPU, so give it a little while. In the meantime, you can make yourself a coffee, have a snack, or join our Discord community and get to know the most amazing people!

SSH into your pi

This example is based on Manjaro OS with Xfce desktop envorinment however this should be similar, if not the same, on other distrobutions. First, open terminal and type in ip -o link show | awk -F': ' '{print $2}'. You should see a list of ethernet interfaces active. Take note of what are available, in my case, I have eno1 and lo (the lo interface will always be there, as it is a loopback virtual adapter, other distributions might differ in naming however this is highly unlikely). Then, connect your pwny and wait for it to boot. Run ip -o link show | awk -F': ' '{print $2}' again, and you should see a new interface, in my case it was named enp0s20f0u2u2, that is your pwny. Take note of that.

Open your Network Manager, you should see a window like this, the amount and names of connections will probably differ but that is okay:

Xfce Network Manager Xfce Network Manager

Click the “+” at the bottom. New window will pop up, asking you to choose connection type. Set “Ethernet” and create.

In this new window, you can enter connection name at the top, and select device that you figured out earlier (in my case it was the enp0s20f0u2u2):

Network manager Ethernet settings Network manager Ethernet settings

After that, head over to “IPv4 Settings”, change method to “Manual” and enter details as on the screenshot:

Network Manager IPv4 settings Network Manager IPv4 settings

After that, you can save and your connection should work. Open the terminal, and type in ssh <username>@10.0.0.2, where <username> is whatever username you have specified in the Imager. If you haven’t, the default is pi. Enter the password you have specified in the Imager, if you haven’t, then the default is raspberry.

Connection sharing

To share internet connection from your computer to your pwnagotchi, all you have to do is download this script using the following command:

wget https://raw.githubusercontent.com/jayofelony/pwnagotchi/master/scripts/linux_connection_share.sh

Once downloaded, you should run it with sudo (check the source before doing that), passing the pwnagotchi’s interface as the first argument and your computer’s network interface as the second argument, like this:

sudo ./linux_connection_share.sh enp0s20f0u2u2 eno1 # WARNING: change the parameters name using your interfaces' names!

After that, your pwnagotchi should be able to connect to internet via USB connection. The script adds some iptables rules to your computer so the packets coming from pwnagotchi’s interface are forwarded to your internet connected interface.

Common issues

> New Network Interface after every boot (MAC-Adress)

This happens, because the pwnagotchi generates a new MAC-address after every reboot. To set a static MAC-address see Common Issues

> After computer reboot, my Pwnagotchi doesn’t connect to internet anymore

This also happens because the pwnagotchi generates a new MAC-address after every boot. Fix: Common issues