Created
March 3, 2015 20:47
-
-
Save dmix/964abd753be07177bff2 to your computer and use it in GitHub Desktop.
Tether to android device on linux (automatically finds enp* card name and connects to it via dhcpcd)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Find card name starting with enp and extract the string from the list | |
card=`ifconfig -a | ag enp | sed -e 's/.*\([^ ]*enp[^ ]*\).*/\1/g' | sed -e 's/://'` | |
# Start tethering with card | |
sudo dhcpcd $card | |
echo "Tethering to $card connected via USB, you sexy bitch" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment