Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux clock Command

Linux clock Command

Linux Command Reference Linux Command Reference

The Linux clock command is used to adjust the RTC time.

RTC is the hardware clock built into the computer. Running this command can display the current time, adjust the hardware clock, set the system time to match the hardware clock, or store the system time back into the hardware clock.

Syntax

clock [--adjust][--debug][--directisa][--getepoch][--hctosys][--set --date="<日期时间>"][--setepoch --epoch=< >][--show][--systohc][--test][--utc][--version]

Parameter Description:

Example

Get the current time

# clock //获取当前的时间

Display the UTC time

# clock -utc //显示UTC时间

Linux Command Reference Linux Command Reference