The timedatectl utility makes it possible for to routinely sync your Linux system clock with remote servers utilizing NTP. NTP stands for Network Time Protocol which is an internet protocol is used to synchronize approach clock between computers. Synchronizing Linux System Clock with a Remote NTP Server In the above result, both hardware clock and system clock has the same result. To verify it, use the following commands- # hwclock (for hardware date and time)įriday 11 March 2016 01:53:03 PM IST -0.359815 seconds To copy system time to hardware time, use the following command- # hwclock -systohc The sample output should be like this – # hwclockįriday 11 March 2016 12:25:56 PM IST -0.594257 seconds To Display Hardware Clock Date and Time, use the following command – # hwclock The sample output should be like this – Local time: Sat 06:40:11 ISTĭST active: n/a Set Hardware Clock in Linux The sample output should be like this – Local time: Fri 00:00:06 ISTĭST active: n/a To set both date and time, use the following command- $ sudo timedatectl set-time " 06:40:00" To verify the above command result, use the following command- $ timedatectl To set date from command line, use the following command – $ timedatectl set-time The sample output should be like this – Local time: Fri 15:58:40 IST To set Time and Date, use the following command – $ timedatectl set-time 15:58:30 The sample output should be like this – Local time: Fri 06:15:58 UTC To verify above command result, use the following command – $ timedatectl To set our time zone according to UTF, use the following command – $ timedatectl set-timezone UTC The sample output should be like this – Local time: Fri 11:42:22 IST To verify the above command result, use the following command – $ timedatectl To set your local timezone in Linux, use the following command- $ timedatectl set-timezone “Asia/Kolkata” The sample output should be like this – Africa/Abidjan To get the available timezones, use the following command – $ timedatectl list-timezones The sample output should be like this – Local time: Fri 11:30:12 IST To get Timezone of your system, use the following command – $ timedatectl The sample output should be like this – Local time: Fri 11:23:54 IST To display time and current date on Linux, use the following command – $ timedatectl status This article describes “How to Set Time, Timezone and Synchronize System Clock using timedatectl Command” Find and Set Local Timezone in Linux
HOW TO CHANGE TIMEZONE LINUX RHEL 6 HOW TO
Do you know how to set Time, Timezone from Linux Command Line? If not, then the timedatectl command helps you to set time and Timezone and it comes as a part of systemd system and service manager.