Pages

Thursday, June 29, 2017

How to Set Time, Timezone and Synchronize System Clock Using timedatectl Command

The timedatectl command is a new utility for RHEL/CentOS 7 and Fedora 21+ based distributions, which comes as a part of systemd system and service manager, a replacement for old traditional date command used in sysvinit daemon based Linux distributions.
Set System Time, Date and Timezone in Linux
Use timedatectl to Set System Time, Date and Timezone in Linux
The timedatectl command allows you to query and change the configuration of the system clock and its settings, you can use this command to set or change the current date, time and timezone or enable automatic system clock synchronization with a remote NTP server.
In this tutorial, am going to take you through the ways you can manage time on your Linux system by setting the datetimetimezone and synchronize time with NTP from the terminal using new timedatectl command.
It is always a good practice to maintain the correct time on your Linux server or system and it can have the following advantages:
  1. maintain a timely operation of system tasks since most tasks in Linux are controlled by time.
  2. correct time for logging events and other information on the system and many more.

How to Find and Set Local Timezone in Linux

1. To display the current time and date on your system, use the timedatectl command from the commandline as follows:
# timedatectl  status
Check Time and Date
Check Time and Date
In the scrrentcast above, RTC time: is the hardware clock time.
2. The time on your Linux system is always managed through the timezone set on the system, to view your current timezone, do it as follows:
# timedatectl 
OR
# timedatectl | grep Time
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
                                                    ► Read more: http://adf.ly/1nBgaN
      ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

No comments:

Post a Comment