hwclock command

GEEKS!!

Yesterday I was online and was chatting to a fan of Network NUTS, the guy is outside of Delhi region. He asked me, “when we are going to open Network NUTS in his city, as there training partners are not teaching everything and good stuff, they are teaching only what they know and they restrict the learning to RHCE course only, nothing outside of the curriculum is shared.”

I was unable to give him a fixed date. But one thing is fixed. That we are here to share with you more and more on RedHat Linux or Linux in general.

So here is a interesting hack on linux.

You all know that there are two clocks in every system. One is the BIOS clock and other is the OS clock. In case of Linux the OS or system clock is managed by Linux Kernel and BIOS clock is managed separately. The hardware clock or BIOS determines the system clock on system boot. While the system is running, changes to one of these doesn’t affect the other.

Ideally we should always set the BIOS clock to the current date and time and then let it sync itself with the OS clock, which is managed by Linux kernel.

OS clock is you know can be managed by date command. Yes the same date command that you had learning in the SA1 of module of your RHCE Training.

But for changing the BIOS clock, we normally reboot the system and goes inside BIOS to set the date. Right!!

Here is a very beautiful command – hwclock

hwclock shows you the BIOS date and time and also it allows you to modify the OS time based on BIOS time or vice versa.

Here is a illustration from my machine.

Enjoy and keep learning more with us.

And don’t forget to share the post, if you like it.

hwclock linux command

hwclock used to see and set the BIOS time.

Advertisements