Linux system modification time zone date tutorial

In the Linux system, you can modify the time zone and date through the following steps:

  1. Check the current time zone:

    • Run the following command to see the current time zone:

      timedatectl
  2. List all available timezones:

    • Run the following command to list all available timezones:

      timedatectl list-timezones
  3. Modify time zone:

    • Run the following command to modify the time zone,  Your_Timezonesubstituting the time zone you wish to set:

      timedatectl set-timezone Your_Timezone
  4. Verify modification:

    • Run the following command to verify the modified time zone:

      timedatectl
  5. Modified date and time:

    • Use the date command to modify the date and time. Run the following command to modify the date and time,  YYYY-MM-DD HH:MM:SSreplacing with the date and time you wish to set:

      date -s "YYYY-MM-DD HH:MM:SS"
  6. Verify modification:

    • Run the following command to verify the modified date and time:

      date

These are the basic steps to modify time zone and date in Linux system. Please note that when making modifications, please ensure that you have sufficient permissions, and backup important date and time data before modifying. Make sure your system is synchronized with network time for accurate date and time information.

Guess you like

Origin blog.csdn.net/tiansyun/article/details/131990005