Comenzi Linux

Hwclock Command

Hwclock Command
The “hwclock” is a command-line utility for both Linux and Unix-like operating systems to access Hardware Clock. It is also termed as Real-Time Clock (RTS) or BIOS clock.

The Hardware Clock is quite different from the clock that is managed by the Linux kernel. It runs when the system is running, and it even remains active when the machine is turned off as it is independent of the operating system you are using.

The Configuration of Hardware Clock can be modified from BIOS. User can also set and view the hardware time using the “hwclock” command:

Syntax:

Syntax of “hwclock” command is:

hwclock [function] [options]…

Getting Started with hwclock:

The “hwclock” tool performs different functionalities with various options.

To display the hardware clock's date and time on the terminal, type “hwclock” in the command-line. The result will be the same as the time and date are set in your BIOS:

hwclock Functions:

To display Real-Time Clock (RTC) on the terminal, use “-r” or “-show.” You will get the same results.

$ sudo hwclock -r

Or

$ sudo hwclock --show

Adjust Hardware Clock:

To control the adjustment of RTC when your system starts, use the “adjust” command:

$ sudo hwclock -adjust

There are many other functions of “hwclock” as well:

hwclock Options:

There are few options of the “hwclock” command:

The “-u” or “-utc” option is used when you want to display that timescale of RTC is UTC.

$ sudo hwclock -u

Or

$ sudo hwclock --utc

-l” or “-localtime” option is used when you want to display that timescale of RTC is Local- time:

$ sudo hwclock -l

Or

$ sudo hwclock --localtime

To print the debug information, use the “debug” option in the terminal with “hwclock”:

$ sudo hwclock -D

Or

$ sudo hwclock --debug

-v” option is used to display version information of “hwclock” in the terminal:

$ sudo hwclock -v

Use the “help” option to get detailed information about the “hwclock” tool in the terminal:

$ sudo hwclock --help

Conclusion:

The “hwclock” is a utility that is used to access hardware time. It is also known as RTC (Real Time Clock) and different from Linux Kernel's clock. In this Linux command tutorial, we learned how Hardware Clockworks. We have also mentioned the usage of the “hwclock” command and its various options.

Cum se instalează League Of Legends pe Ubuntu 14.04
Dacă ești fan al League of Legends, atunci aceasta este o oportunitate pentru tine de a testa rula League of Legends. Rețineți că LOL este acceptat pe...
Instalați cel mai recent joc de strategie OpenRA pe Ubuntu Linux
OpenRA este un motor de jocuri de strategie în timp real Libre / Free care recreează primele jocuri Westwood, cum ar fi clasicul Command & Conquer: Re...
Instalați cel mai recent Dolphin Emulator pentru Gamecube și Wii pe Linux
Emulatorul Dolphin vă permite să jucați jocurile alese de Gamecube și Wii pe computerele personale Linux (PC). Fiind un emulator de joc liber disponi...