Linux clocks are divided into System Clock and Real Time Clock (RTC) clocks. The system clock refers to the clock in the current Linux Kernel, and the hardware clock is the battery-powered clock on the motherboard. This hardware clock can be set in the BIOS. When Linux boots, the hardware clock reads the system clock settings, and the system clock runs independently of the hardware.
All commands (including functions) in Linux are system clock settings. In Linux, the commands for clock viewing and setting are mainly date, hwclock, and clock. Among them, the clock and hwclock usage are similar, only one is used, but the clock command supports the Alpha hardware system in addition to the x86 hardware system.
1, date
View system time
# date
Set system time
# date –set “07/07/06 10:19″ (month/day/year hour:minute:second)
2, hwclock/clock
View hardware time
# hwclock –show
or # clock –show
Set hardware time
# hwclock –set –date=”07/07/06 10:19″ (month/Day/year hour: minute: second)
or #clock –set –date=”07/07/06 10:19″ (month/day/year hour:minute:second)
3, hardware time and system time synchronization
According to the previous statement, restart the system, hardware time will read the system time, achieve synchronization, but do not restart When you need to use the hwclock or clock command to achieve synchronization.
The hardware clock is synchronized with the system clock: # hwclock –hctosys (hc stands for hardware time, sys stands for system time) or # clock –hctosys
system clock and hardware clock synchronization: # hwclock –systohc or #clock –systohc
4, time zone settings
# tzselect
Please identify a location so that time zone rules can be set correctly. 1 continent Africa 2) Americas 3) Antarctica 4) Arctic Ocean 5) Asia 6) Atlantic Ocean 7) Australia Europe 9) Indian Ocean10) Pacific Ocean11) none – I want to specify the time zone using the Posix TZ format.#? Input 5, Asia
Please select a country. 1) Afghanistan 18) Israel 35) Palestine 2) armenia 19) Japan 36) Philippines 3) Azerbaijan 20) Jordan 37) Qatar 4) Bahrain 21) Kazakhstan 38) Russia 5) Bangladesh 22) Korea (North) 39) Saudi Arabia 6) Bhutan 23) Korea (South) 40) Singapore 7) Brunei 24) Kuwait 41) Sri Lanka Cambodia 25) Kyrgyzstan 42) Syria 9) China 26) Laos 43 Taiwan10) Cyprus 27) Lebanon 44) Tajikistan11) East Timor 28) Macau 45) Thailand12) Georgia 29) Malaysia 46) Turkmenistan13) Hong Kong 30) Mongolia 47) United Arab Emirates14) India 31) Myanmar (Burma) 48) Uzbekistan15) Indonesia 32) Nepal 49) Vietnam16) Iran 33) Oman 50) Yemen17) Iraq 34) Pakistan#? Enter 9, China
Please select one of the following time zone regions.1) east China – Beijing, Guangdong, Shanghai, etc.2) Heilongjiang3) central China – Gansu, Guizhou, Sichuan, Yunnan, Etc.4) Tibet & most of Xinjiang Uyghur5) southwest Xinjiang Uyghur#? Enter 1, Beijing time
The following information has been given:
China east China – Beijing, Guangdong, Shanghai, etc.
TZ=”Asia/Shanghai” will be used.Local time is now: Fri Jul 7 10:32:18 CST 2006.Universal Time is now: Fri Jul 7 02:32:18 UTC 2006.Is the above information OK? 1) Yes2) No#? Enter 1 to confirm
If you do not use the tzselect command, you can modify the file change time zone.
# vi /etc/sysconfig/clock ZONE=Asia/Shanghai (check the file under /usr/share/zoneinfo) UTC=false ARC=false
# rm /etc/localtime< Br>
# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Restart.
A few days ago, a Linux system administrator asked the author for help. He said th
1.LinuxOSVersion:RedHat AS 52. Network Environment Settings: Host (Linux): IP: 192.168.1.1 NetMark:
A few days ago, I met a friend on QQ and asked for help. I said that the VPS I bought could not sta
1. Lock the redundant self-built account in the systemCheck method:Execute the command#cat /etc/pas
How to view the sector size in Linux
How to do linux system security
Solve the situation where the graphic in Ubuntu details is unknown.
Linux query memory real utilization
Linux zombie process and its solution
Network Device Management for Linux Network Protocol Stack (Continued)
What kind of partition should Linux be installed on?
Shorewall firewall installation and configuration method under Linux
Win7 Ultimate version of the computer prompt dll dynamic link library failure how to fix?
Win10 uses WIN+E to open this computer's setup skills
Top 10 Reasons to Upgrade Win 2000 to 2003
Solve the problem of Win2008 and Win7 coexistence
LOL Doomsday Herald Scarecrow outfits Rune Raiders
What if Windows 8.1SecureBoot is not configured correctly?
Windows 8 system connection network reported 651 error solution