Site icon TechGit

Using timedatectl Command On Ubuntu Linux Systems

Using timedatectl command in Ubuntu to display current time & date setting in Ubuntu. How to get date and time using command line interface. Ubuntu commands to get system time – Ubuntu set timezone or update system time. Ubuntu users can also change date and time via command line on Ubuntu Systems.

The Linux Ubuntu system is configured to read the RTC time in the local time zone. A Linux Ubuntu system has two clocks:

  1. Real Time Clock: The battery powered “Real Time Clock” also known as the “RTC”, “CMOS clock”, or “Hardware clock”. It keeps track of time when the system is turned off but is not used when the system is running.
  2. System Clock: Software clock maintained by the kernel and used to implement gettimeofday and time, as well as setting timestamps on files, etc.

A major difference between an RTC and the system clock is that RTCs run even when the system is Off or in a low power state and the system clock can’t. RTC usually has battery backup power so that it tracks the time even while the computer is turned off.

timedatectl Command

timedate-ubuntu

timedatectl command in Ubuntu is used to display current time & date setting. The command is primarily used to control the system time and date. timedatectl may be used to query and change the system clock and its settings.

timedatectl Usage

timedatectl [OPTIONS…] {COMMAND}

timedatectl Command Options

timedate-ubuntu-16

timedatectl Usage

When the timedatectl command is executed successfully, 0 is returned, a non-zero failure code otherwise.

Show current settings:

$ timedatectl

Enable network time synchronization:

$ timedatectl set-ntp true
$ systemctl status systemd-timesyncd.service

Set Timezone Using CLI

$ sudo timedatectl set-timezone Asia/Kolkata

Get The List Of Available Timezones

$ timedatectl list-timezones

Using timedatectl Command On Ubuntu Linux Systems originally posted on Source Digit – Latest Technology, Gadgets & Gizmos.

FacebookTwitterTumblrRedditLinkedInHacker NewsDiggBufferGoogle ClassroomThreadsXINGShare
Exit mobile version