Skip to content

Instantly share code, notes, and snippets.

@avegancafe
Created December 30, 2014 20:40
Show Gist options
  • Select an option

  • Save avegancafe/ee90614db4ad67248009 to your computer and use it in GitHub Desktop.

Select an option

Save avegancafe/ee90614db4ad67248009 to your computer and use it in GitHub Desktop.
A bash script for updating the time in Linux using ntpdate
#!/bin/bash
# echo "Hello, world!"
sudo service ntp stop
echo "Updating time..."
sudo ntpdate -s time.nist.gov
sudo service ntp start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment