Skip to content

Instantly share code, notes, and snippets.

@sleepdefic1t
Created October 29, 2017 16:24
Show Gist options
  • Save sleepdefic1t/eff7c69c0485294f8d6d60eddb3f41eb to your computer and use it in GitHub Desktop.
Save sleepdefic1t/eff7c69c0485294f8d6d60eddb3f41eb to your computer and use it in GitHub Desktop.
One-line command to update Raspberry Pi system-time. Obviously, you must be connected to the web.
// one-line time-update
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment