Javatpoint Logo
Javatpoint Logo

How to Change Time in Kali Linux

The purpose of this tutorial is to display how to change the system time in Kali Linux. In Kali Linux, we can change the time using GUI and the command line, and in this tutorial, we will discuss both.

When we first install Kali, we should set our system time and time zone. If we skipped that step during installation, then changed the time zone, or our system clock got out of sync.

How to Set Time via GUI

Suppose we are using the Xfce desktop environment in Kali that is the default GUI. If we are using GNOME or another environment, then the screenshots below will seem slightly different. However, the steps should be relatively similar.

Step 1: First, we have to right-click the time on our desktop and open the properties menu.

How to Change Time in Kali Linux

Step 2: Then, we have to enter our time zone into the box. The Xfce will automatically complete our search as we type. If the correct one does not appear, try typing it again to see if the matching works. For example, "U.S. Eastern time zone," is simply listed as "EST" in this menu.

How to Change Time in Kali Linux

Step 3: After we type our time zone, we are able to modify some other setting; we have to click on the close button when we are finished.

How to Change Time in Kali Linux

It is as simple as that. Our system clock should now be set to the time zone we choose. We do not need to set the time and date manually, as Kali will query the online time server to find the correct date and time for our configured time zone.

We'll have to use the command line method, which we'll cover in the following section if we want to manually specify the time or date instead of just the time zone. We can also sync with a specific city, such as New York, by setting our time zone from the command line.

Set Time via Command Line

In various cases, we'll just need to change our time zone, which we'll show you how to do below. But we will also discuss how to adjust our system clock manually, but in case we need to set a different date or time than official time servers.

Step 1: First, in order to find out what time zone our system is presently configured for, we have to open the terminal and execute the following command.


How to Change Time in Kali Linux

Step2: Next, with the help of the following command, we can get a list of accessible time zones. Choose one which is appropriate for our area and configure our system to that time zone in the next step.


How to Change Time in Kali Linux

In order to narrow down the search, we can use the grep command. This command will provide a list of all possible time zones in Australia, as shown in the example below:

How to Change Time in Kali Linux

Step 3: We need to use the following syntax to set the system's time zone once we've selected the correct time zone from the list.

Step 4: Use the timedatectl command to verify that the modifications have taken effect.

How to Change Time in Kali Linux

Step 5: We can use the following commands, in order to turn time synchronization on or off:

If these commands fail, uninstall the NTP package and replace it with systemd-timesyncd. Both of these things can be accomplished with the following command.


How to Change Time in Kali Linux

Step 6: If we want to change the system clock to a certain date and time, make sure time synchronization is off (as described above) and use the following date command. This command will set the date and time to 05 November 2021, 08:42 PM, but we can substitute any value which we want.


How to Change Time in Kali Linux
Next TopicKill Process





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA