How to Change Date and Time on Debian Linux

On Debian Linux, you can change the date and time using the date command in the terminal. However, this change will only persist until the next reboot. To set the system time permanently, you can use the timedatectl command.

Here is how you can change the date and time using timedatectl:

  1. Open a terminal window.
  2. Type the following command to see the current date and time:
$ timedatectl
  1. To set the date, use the following command:
$ sudo timedatectl set-time YYYY-MM-DD

Replace YYYY-MM-DD with the desired date.

  1. To set the time, use the following command:
$ sudo timedatectl set-time HH:MM:SS

Replace HH:MM:SS with the desired time.

  1. To set both the date and time, use the following command:
$ sudo timedatectl set-time 'YYYY-MM-DD HH:MM:SS'

Replace YYYY-MM-DD HH:MM:SS with the desired date and time.

Note that you need to have administrative privileges (i.e., be a member of the sudo group) to change the system time using timedatectl. After making the changes, you can verify the new date and time using the timedatectl command again.

Visited 10 times, 1 visit(s) today

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top