Hello, i am a new linux user and the system clock is off by an hour. I did some googling and found a package called ntpd. When i run the command “sudo ntpd -qg” it fixes my clock. How can i run this on startup, so that I don’t have to keep typing it in manually?
This will both start it and enable it to automatically start at boot time.
Incidentally, the problem of your clock being an hour off is most likely caused by the fact that you’re dual-booting with Microsoft Windows.
GNU/Linux prefers to store the time in the hardware clock as UTC, but Windows stores it as local time, and so after having rebooted from Windows into GNU/Linux, your system clock will be off. You can tell GNU/Linux to store the hardware clock in local time instead of UTC, or do the opposite in Windows, but the latter is more difficult — it involves diving into the Windows Registry — even though it is the preferred way.