Last active
March 25, 2017 22:44
-
-
Save PhilipTrauner/ab31ca038f180f38a1c41f23be5bf0f5 to your computer and use it in GitHub Desktop.
Enable SSH and Ethernet over USB on any Raspberry Pi running Raspbian
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
# Mac specific, edit to suit your needs | |
cd /Volumes/boot | |
# Enable ssh | |
touch ssh | |
# Append dtoverlay=dwc2 to config.txt | |
if ! grep -Fxq "dtoverlay=dwc2" config.txt | |
then | |
echo "dtoverlay=dwc2" >> config.txt | |
fi | |
# Append modules-load=dwc2,g_ether after rootwait | |
python3 -c 'if not "modules-load=dwc2,g_ether" in open("cmdline.txt", "r").read(): c = "rootwait modules-load=dwc2,g_ether".join(open("cmdline.txt", "r").read().split("rootwait")); open("cmdline.txt", "w").write(c)' | |
# Don't forget to run 'localedef -i en_US -f UTF-8 en_US.UTF-8' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment