bramaudi

Setup date & time automatically by network in Linux

 ·  1 minutes read

In my current Linux system, whenever electricity goes down, then after that I'm always losing my date & time settings (probably because I need to buy a new CMOS battery).

Before I learned about this, setting up the date and time manually was so annoying. But we don't need to worry, using this one-liner command, everything will automatically set up perfectly.

sudo ntpdate -s id.pool.ntp.org

I'm using id.pool.ntp.org because I'm in Indonesia, if you on different country then try find it on pool.ntp.org to see the list of time server around the world.

Tags: #linux