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
Here is how you can change the date and time using
- Open a terminal window.
- Type the following command to see the current date and time:
- To set the date, use the following command:
$ sudo timedatectl set-time YYYY-MM-DD
YYYY-MM-DD with the desired date.
- To set the time, use the following command:
$ sudo timedatectl set-time HH:MM:SS
HH:MM:SS with the desired time.
- To set both the date and time, use the following command:
$ sudo timedatectl set-time 'YYYY-MM-DD HH:MM:SS'
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.