Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

2.2. Command Line Configuration


In case your system does not have the Date/Time Properties tool installed, or the X Window Server is not running, you will have to change the system date and time on the command line. Note that in order to perform actions described in this section, you have to be logged in as a superuser:
~]$ su -
Password:
Copy to Clipboard Toggle word wrap

2.2.1. Date and Time Setup

The date command allows the superuser to set the system date and time manually:
  1. Change the current date. Type the command in the following form at a shell prompt, replacing the YYYY with a four-digit year, MM with a two-digit month, and DD with a two-digit day of the month:
    ~]# date +%D -s YYYY-MM-DDdate +%D -s YYYY-MM-DD
    Copy to Clipboard Toggle word wrap
    For example, to set the date to 2 June 2010, type:
    ~]# date +%D -s 2010-06-02
    Copy to Clipboard Toggle word wrap
  2. Change the current time. Use the following command, where HH stands for an hour, MM is a minute, and SS is a second, all typed in a two-digit form:
    ~]# date +%T -s HH:MM:SSdate +%T -s HH:MM:SS
    Copy to Clipboard Toggle word wrap
    If your system clock is set to use UTC (Coordinated Universal Time), add the following option:
    ~]# date +%T -s HH:MM:SS -udate +%T -s HH:MM:SS -udate +%T -s HH:MM:SS -u
    Copy to Clipboard Toggle word wrap
    For instance, to set the system clock to 11:26 PM using the UTC, type:
    ~]# date +%T -s 23:26:00 -u
    Copy to Clipboard Toggle word wrap
You can check your current settings by typing date without any additional argument:

Example 2.1. Displaying the current date and time

~]$ date
Wed Jun  2 11:58:48 CEST 2010
Copy to Clipboard Toggle word wrap
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat