Fix Incorrect Date in Ubuntu: Quick Terminal Guide
To adjust the date of the Ubuntu system, you can use the following command:
- Open the terminal.
- Use the following command to adjust the date and time:
sudo date MMDDhhmm[[CC]YY][.ss]
The meaning of the parameters here is as follows:
- MM: Month
- DD: Date
- hours
- mm: minutes
- CC: Century
- YY: Year
- ss:seconds
For example, if you want to set the date to October 15, 2022 at 3:45:30 PM, you can input the following command:
sudo date 101517452022.30
- Enter the password to confirm the change.
Additionally, you can also adjust the date and time using a graphical interface. Find the “Date and Time” option in the system settings, where you can adjust the system date and time manually or choose automatic synchronization.