System Time II
Synchronizing Time with netdate
You can use the netdate command to synchronize time on the local system with the time on a time
server over the network. The syntax is
netdate time_server
where time_serveris the IP address or DNS name of another Linux system on the network that is running the time service, which is configured to listen on UDP port 37 by default for time requests. The time server could be an internal provider on your local LAN, or it could be an Internet-based time provider.
After syncing the system time with netdate, you may want to synchronize the system time with
your hardware clock using the
hwclock --systohc
command discussed earlier.
It’s important to note that netdate only syncs time once. If your system time drifts (and it will),
you may need to run netdate (and possibly hwclock --systohc) on a regular schedule to keep time
in sync. This can be done automatically using a cron job. However, it’s really not the best option.
LX0-104 Exam Objectives (N)
No comments:
Post a Comment