هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.
ماذا يفعل
The hardware clock keeps time when the machine is off. At boot the kernel sets the system clock from it. hwclock shows it, --systohc writes the system time into it, --hctosys the other way. On RHEL chronyd keeps the RTC in sync (rtcsync), so you rarely need it.
طريقة الكتابة
hwclock [FUNCTION] [OPTION]...الخيارات 22
الأكثر استخدامًا
Functions
Options
لا يوجد شيء يطابق هذا الفلتر.
أمثلة 10
$ مستخدم عادي# بصلاحية root (أو مع sudo)
1Show the hardware clock
hwclock 2026-10-25 11:42:10.123456+03:00Shown in local time.
2Write the system time to the RTC
hwclock --systohcAfter you set the time by hand.
3Set the system time from the RTC
hwclock --hctosysRarely needed (boot does it).
4Is the RTC in UTC?
grep -E 'UTC|LOCAL' /etc/adjtime UTCLinux servers should use UTC.
5Compare both clocks
hwclock; dateA big difference = RTC battery or sync problem.
6Set the RTC to a date
hwclock --set --date="2026-10-25 12:00:00"Test only.
7Dry run
hwclock --systohc --testShows what would happen.
8Same data in timedatectl
timedatectl | grep RTCRTC time and RTC in local TZ.
9Dual boot with Windows
timedatectl set-local-rtc 1Windows uses local time in the RTC; avoid on servers.
10Check chrony keeps the RTC in sync
grep rtcsync /etc/chrony.conf rtcsyncThe kernel copies the time to the RTC every 11 minutes.
لا يوجد شيء يطابق هذا الفلتر.
الملفات
/etc/adjtime- Drift data and UTC/LOCAL setting.
/dev/rtc0- The RTC device.
رموز الخروج
0 | Done. |
1 | Error. |