Linux view current date and time

View and modify the Linux time zone

    view the current time zone command: “date – R” modify Settings Linux server time zone method

    A command: “tzselect”
    Method B is limited to RedHat Linux and CentOS
    command: “TimeConfig”
    Dpkg-reconfigure TzData for Debian
    : “dpkg-reconfigure”

      Copy the corresponding time zone file and replace the system time zone file; Or create the link file
      cp /usr/share/zoneinfo/

      The main

      when

      area

      /

      The main time zones /

      Primary time zone/secondary time zone /etc/localtime

    For example, use Asia/Shanghai (+8) when setting China time zone.
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    Second, the time to view and modify Linux
    The

      command to check the time and date “the date”
      2. Set a time and date
      for example, to set the system date into a command on November 3, 2009
      Command: “date-s 11/03/2009”
      Set the system time to 5:55:55 p.m
      Command: “Date -s 17:55:55”

        to write the current date and time into the BIOS, to avoid failure after restart
        command: “hwclock – w
        Note:
        date
        You can see the current date and time directly without adding arguments
        Cal
        can be viewed directly without parameter
        Reproduced in: https://www.cnblogs.com/Ivan-j2ee/p/3192875.html


Read More: