خدمات NTP ومزامنة الوقت
حافظ على دقة ساعات Linux باستخدام NTP مع chrony وtimedatectl، وافهم سبب أهمية الوقت المتزامن للخدمات المتصلة بالشبكة.
خدمات NTP ومزامنة الوقت درس مجاني في Linux Networking & TCP/IP for Developers على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Linux Networking & TCP/IP for Developers، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Linux Networking & TCP/IP for Developers 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Why Time Matters
Accurate clocks are essential for networked systems. Logs, TLS certificates, authentication tokens, and distributed databases all break when clocks drift apart. The Network Time Protocol (NTP) keeps them aligned.
How NTP Works
NTP clients query time servers, measure the network round-trip, and gradually adjust the local clock. It corrects for delay so even over the internet machines stay within milliseconds.
Stratum Levels
NTP servers are ranked by stratum. Stratum 0 is a reference clock (like GPS), stratum 1 servers connect directly to it, and each layer below is one step further. Lower stratum means closer to the source.
Checking Time Status
The simplest check is timedatectl, which shows the current time, timezone, and whether NTP synchronization is active.
timedatectl statusEnabling NTP
Turn on automatic synchronization with one command. The system then keeps the clock in sync in the background.
sudo timedatectl set-ntp trueMeet chrony
chrony is the modern NTP implementation used by most Linux distributions. It handles intermittent connections and large time jumps better than the older ntpd.
sudo systemctl status chronydViewing Sources
List the time servers chrony is using and how it rates them with chronyc sources. The asterisk marks the currently selected source.
chronyc sources -vMeasuring Accuracy
chronyc tracking shows how far off the clock is and how it is being corrected, including the estimated offset from true time.
chronyc trackingConfiguring Servers
Edit /etc/chrony/chrony.conf to point at preferred pools or internal time servers, then restart the service. Many setups use the public NTP pool.
pool pool.ntp.org iburstTimezone vs Clock
Time synchronization sets the absolute moment (UTC), while the timezone affects how it is displayed. Set the zone separately and keep the hardware clock in UTC.
sudo timedatectl set-timezone Europe/IstanbulForcing a Sync
After a long downtime the clock may be far off. chronyc makestep forces an immediate correction instead of slowly slewing, useful right after boot.
sudo chronyc makestepQuick Check
Test your NTP knowledge.
Recap
You learned to manage time synchronization.
- NTP keeps clocks aligned, which is critical for logs, TLS, and auth.
- Use
timedatectlto check and enable sync; chrony is the modern daemon. chronyc sourcesandtrackingshow servers and accuracy.
تعلم Linux Networking & TCP/IP for Developers مع معلم ذكاء اصطناعي — مجانًا
اكتب وقم بتشغيل أكوادك الفعلية في المتصفح، واحصل على مساعدة فورية من معلم ذكاء اصطناعي متاح 24/7، واستمر من حيث توقفت على الويب أو في التطبيق.
- الدورات
- 12
- الدروس
- 48
الأسئلة الشائعة
هل درس «خدمات NTP ومزامنة الوقت» مجاني؟
نعم — نص درس «خدمات NTP ومزامنة الوقت» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Linux Networking & TCP/IP for Developers، انتقل إلى CoddyKit PRO. تتضمن دورة Linux Networking & TCP/IP for Developers 4 دروس في المجموع.
ماذا ستتعلم في «خدمات NTP ومزامنة الوقت»؟
حافظ على دقة ساعات Linux باستخدام NTP مع chrony وtimedatectl، وافهم سبب أهمية الوقت المتزامن للخدمات المتصلة بالشبكة. تتمرن على Linux Networking & TCP/IP for Developers مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Linux Networking & TCP/IP for Developers؟
لا تُشترط خبرة سابقة. Linux Networking & TCP/IP for Developers على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.
كم من الوقت يستغرق درس «خدمات NTP ومزامنة الوقت»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Linux Networking & TCP/IP for Developers هذا؟
نعم. كل درس في Linux Networking & TCP/IP for Developers يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- SSH للوصول البعيد الآمن
- خدمات الويب HTTP/HTTPS
- خدمات DHCP وDNS
- خدمات NTP ومزامنة الوقت