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, to achieve synchronization, but do not restart, you need to use hwclock Or the 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.
The icons in the upper left corner of Windows 7 Explorer are Favorites, Desktops, and various Librar
xenserver XenCenter can bind the network card, support Active-Active and Active-Standby mode, but on
If you have used Linux for a while and feel that the hard disk is not enough, you
without splitting the hard disk Installing Linux is a bit scary for novices: partitions and some ma
Linux system is gradually marginalized: the share is negligible
Configuring JAVA environment variables under SUSE Linux system BASH
Linux shell logical operators, logical expressions detailed
Linux rc.local self-starting service
Linux file copy, delete and move commands
Linux Network Programming--Advanced Socket Function
Install FTP under CentOS 6.2 32-bit
Linux environment variable settings and access
Strengthening USB Device Control Ensuring Operating System Security
Explain the powerful chat features of Excel
Win10 system broadband connection error 720 solution
What should I do if the win7 system login process fails to initialize?
How to manually enter the advanced startup item of Win8 system
How does the 360 browser screenshot the entire page?
Win8 desktop /start screen wallpaper
Retrieve the wireless password of Windows 7 operating system
Win10 new function confirms regression: start menu, start screen merge into one