I searched around and didn't find any specific thread with clear, concise steps.
These directions work for a Paperwhite 3 with firmware 5.9.7 serial Serial G090 G105 and Windows 7, although it's not limited to that at all.
Step 1: Jailbreak your kindle
https://www.mobileread.com/forums/sh...d.php?t=225030
Step 2: Install USBNetwork
https://www.mobileread.com/forums/sh...d.php?t=225030
Step 3: I had to completely restart my Kindle for the USBNetwork mode and mass storage driver mode to both work after installing.
Step 4: After reboot, toggle usbnetwork, make sure it's on. Plug Kindle into PC.
Step 5: Open device manager and under Universal Serial Bus Controllers there is an entry for RNDIS/Ethernet Gadget with an exclamation point because it has no driver. Right click it, update driver software, browse my computer for driver software, Let me pick from a list of device drivers on my computer. A window will come up asking to select the device type. Select Network adapters
Step 6: In the manufacturer section, scroll down to "Microsoft Corporation" (Not "Microsoft"). In Network Adapter section, select Remote NDIS Compatible Device". Click Next. When the prompt says "Installing this device is not recommended", click yes continue anyway. Finish install.
Step 7: Verify in Device Manager that under Network Adapters you now have an entry for "RNDIS/Ethernet Gadget".
Step 8: Go to network adapters. You should see a new entry entitled "Local Area Connection [#]" - Unidentified Network - RNDIS/Ethernet Gadget. That is your gateway to your Kindle.
Step 9: Assign a static IP address to this adapter. The default IP of the Kindle is 192.168.15.244. So assign an IPV4 IP starting with 192.168.15.2-254. But not .244 obviously.
Step 10: Install putty, open putty, put 192.168.15.244 in as the address, type a name, save. Open that name. login is "root", and hit enter. Enjoy your command line.