Korzystając z tej witryny, zgadzasz się na Polityka prywatności.
Przyjąć
EnterineEnterineEnterine
  • DOM
  • To pro
  • Tech
  • Microsoft
    • Lazur
    • Menedżer konfiguracji/SCCM
    • DPM
    • Orkiestrator
    • Hyper-V.
    • Niejawny tester Microsoft Edge
    • MSI
    • Biuro 365
    • Nieznajomy biura
    • Power bi
    • Skype'a
    • Serwer SQL
    • Zespoły
  • OKNA
    • Centrum administracyjne systemu Windows
    • Klient Windowsa
    • Serwer Windows
  • Lista kolekcji zapytań SCCM
Czytanie: How to Check Timezone in Linux
Zmiana rozmiaru czcionkiAaa
EnterineEnterine
Zmiana rozmiaru czcionkiAaa
  • DOM
  • To pro
  • Tech
  • Microsoft
  • OKNA
  • Lista kolekcji zapytań SCCM
Szukaj
  • DOM
  • To pro
  • Tech
  • Microsoft
    • Lazur
    • Menedżer konfiguracji/SCCM
    • DPM
    • Orkiestrator
    • Hyper-V.
    • Niejawny tester Microsoft Edge
    • MSI
    • Biuro 365
    • Nieznajomy biura
    • Power bi
    • Skype'a
    • Serwer SQL
    • Zespoły
  • OKNA
    • Centrum administracyjne systemu Windows
    • Klient Windowsa
    • Serwer Windows
  • Lista kolekcji zapytań SCCM
Linuksa

How to Check Timezone in Linux

Opublikowany: Luty 4, 2024
2 Min. odczyt
UDZIAŁ

How to Check Timezone in Linux. Maintaining proper time management is crucial for any system, especially a Linux server. This article delves into the various ways to check your system’s time zone, catering specifically to novice users.

Several utilities exist in Linux to handle time, including date I timedatectl. These tools not only display the current time zone but also facilitate synchronization with remote NTP servers for automatic, accurate timekeeping.

Let’s embark on a journey through the different methods of discovering your system’s time zone:

1. The Traditional Route: The date Command:

To reveal the current time zone using the classic date rozkaz, simply type:

date

Alternatively, you can leverage specific format specifiers to customize the output:

  • %Z displays the alphabetic time zone.
  • %z displays the numeric time zone.

Na przykład:

date +"%Z %z"

Utilize the man command to explore various format options available:

man date

2. Unveiling the Time Zone with timedatectl:

Executing timedatectl without any arguments provides an overview of the system, including the time zone:

timedatectl

For a more focused approach, combine timedatectl with the grep command to filter the output:

timedatectl | grep "Time zone"

3. Exploring the Time Zone File:

Users of Debian-based distributions can view the contents of the /etc/timezone file using the cat utility:

cat /etc/timezone

4. Symbolic Links and Time Zone Management:

For users of Red Hat Enterprise Linux (RHEL)/CentOS 7 and Fedora versions 25-22, . /etc/localtime file serves as a symbolic link to the actual time zone file located within the /usr/share/zoneinfo directory.

5. Setting the Time Zone:

You can modify the time zone by creating a symbolic link from /etc/localtime to the desired zone file within /usr/share/zoneinfo.

Here’s the syntax:

sudo ln -sf /usr/share/zoneinfo/zoneinfo /etc/localtime
  • -s: Creates a symbolic link.
  • -f: Removes any existing destination file.

For instance, to switch to the Africa/Nairobi time zone:

sudo ln -sf /usr/share/zoneinfo/Africa/Nairobi /etc/localtime
OZNACZONE:AlmaruxCentOSLinuksaUbuntu
Następny artykuł Lista kolekcji zapytań programu Menedżer konfiguracji Aktualizacja podglądu technicznego menedżera konfiguracji systemu 1611
Zostaw komentarz Zostaw komentarz

Zostaw odpowiedź Anuluj odpowiedź

Twój adres e-mail nie zostanie opublikowany. Wymagane pola są zaznaczone *

Ta strona korzysta z Akismet w celu ograniczenia spamu. Dowiedz się, jak przetwarzane są dane dotyczące Twoich komentarzy.

Tłumaczenie

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
przez Transposh - translation plugin for wordpress

Popularne posty

Wymagania systemowe dla serwera Windows 2016
Serwer Windows
Lista kolekcji zapytań programu Menedżer konfiguracji
Lista kolekcji zapytań programu Menedżer konfiguracji
Configmgr
Nawigacja strukturalna/zarządzana włączona na nowoczesnych stronach w klasycznych witrynach zespołu
Tech
SCCM Nie udało się uzyskać lokalizacji DP w oczekiwanej wersji z MP
Configmgr

Ostatnie posty

Instalowanie i konfigurowanie Fail2ban dla ochrony SSH na Ubuntu 24.04
Linuksa
Włączanie i konfiguracja FirewallD na AlmaLinux
Linuksa
Tworzenie użytkownika i konfiguracja klucza SSH w AlmaLinux
Linuksa
Jak zresetować hasło w AlmaLinux
Linuksa

© 2023 Enterine

Przejdź do wersji mobilnej
Witamy z powrotem!

Zaloguj się na swoje konto

Nazwa użytkownika lub adres e-mail
Hasło

Zgubiłeś hasło?