Skip to content

Instantly share code, notes, and snippets.

@dcloud
Last active July 19, 2019 01:01
Show Gist options
  • Save dcloud/8bea864b63e8fa37abcf507593afea9b to your computer and use it in GitHub Desktop.
Save dcloud/8bea864b63e8fa37abcf507593afea9b to your computer and use it in GitHub Desktop.
Collecting some things I should remember when configuring Raspberry Pis

Pi Hints

Can't connect to archive.raspberrypi.org or similar?

Are you using ipv6? If so, you might need to force apt to use ipv4, e.g. sudo apt-get -o Acquire::ForceIPv4=true update. The -o Acquire::ForceIPv4=true config will force ipv4.

You can configure apt to do this without the need to add the option each time. Simply place that option in a config file: echo 'Acquire::ForceIPv4 "true";' | sudo tee /etc/apt/apt.conf.d/99force-ipv4. That will create a conf file to change Apt settings.

I think I used https://www.ostechnix.com/how-to-force-apt-package-manager-to-use-ipv4-in-ubuntu-16-04/ as inspiration.

Make sure your pi is accessible via hostname.local addresses

Following https://www.howtogeek.com/167190/how-and-why-to-assign-the-.local-domain-to-your-raspberry-pi/.

Essentially, sudo apt-get install avahi-daemon. Make sure the Pi has an mDNS broadcaster installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment