How to Change System Date and Time on Ubuntu

How to Change System Date and Time on Ubuntu

 

To be an Ubuntu power user, you must learn the command line. This is the most powerful part of Ubuntu that you can do almost everything from the terminal without the GUI.

In this tutorial we are going to learn how to change the system date and time on Ubuntu from the command line.

This is a step-by-step tutorial on learn how to change the system date and time on Ubuntu from the command line. To follow this tutorial, you need to have the following requirements:

• A computer with Ubuntu operating system installed.
• Basic knowledge of Ubuntu terminal. With basic I mean, how to open a terminal on Ubuntu and how to execute commands.

First open the terminal of your Ubuntu operating system. You can open your terminal by pressing Control, Alt and T at the same time. You can also go to the Unity dashboard and search by the keyword “Terminal” and click on the terminal. Or you can right click on the Desktop and click on “Open Terminal”.

You can use the ‘date’ command to set the system date and time on Ubuntu from the command line.

To do that, you use the following command,

sudo date –set “YYYY-MM-DD HH:MM:SS AM/PM”

Here

• YYYY is the 4-digit year
• MM is the 2-digit month
• DD is the 2-digit day
• HH is the 2-digit hours
• MM is the 2-digit minutes
• SS is the 2-digit seconds

Let’s set it to 2016-11-16 11:21 AM.

Type the following command,

sudo date –set “2016-11-16 11:21 AM”

sudo-date

Now run ‘date’ command with no argument to verify the change.

date

Take a look at the status bar, the time changed as well,

the-time-changed-as-well