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