Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Place this snippet in your /etc/rc.local file so an RPI will sync time on boot
#!/bin/sh
#force time set with NTP server
clear
echo Setting the time and date. Your sudo password may be required below...
echo
sudo ntpdate -bu pool.ntp.org
echo
echo The time and date are now set to `date`
echo
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.