Open In App

hwclock command in Linux with examples

hwclock also called Real Time Clock (RTC), is a utility for accessing the hardware clock. The hardware clock is independent of the OS(operating system) you use and works even when the machine is shut down. The hardware clock is also called a BIOS clock. A user can also change the date and time of the hardware clock from the BIOS. The hardware clock stores the values of the second, minute, hour, day, month and year. The hwclock utility saves its settings in the /etc/adjtime file, which is created when a user makes first change.

Syntax:



hwclock [function] [option...]

Functions:

Options:



Note: Use sudo with hwclock command.

Examples:

1. To display the Hardware Clock Date and Time:

2. Using adjust function:

3. Using debug option to get the debug information:

Article Tags :