En utilisant ce site, vous acceptez le politique de confidentialité.
Accepter
EntérinEntérinEntérin
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
    • Azuré
    • Configmgr / sccm
    • DPM
    • Orchestrateur
    • Hyper-v
    • Microsoft Edge Insider
    • MSI
    • Bureau 365
    • Bureau Insider
    • Power Bi
    • Skype
    • Serveur SQL
    • Équipes
  • FENÊTRES
    • Centre d'administration Windows
    • Client Windows
    • Serveur Windows
  • Liste de collecte de requêtes SCCM
En lisant: How to Check Timezone in Linux
Redimensionneur de policeAA
EntérinEntérin
Redimensionneur de policeAA
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
  • FENÊTRES
  • Liste de collecte de requêtes SCCM
Recherche
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
    • Azuré
    • Configmgr / sccm
    • DPM
    • Orchestrateur
    • Hyper-v
    • Microsoft Edge Insider
    • MSI
    • Bureau 365
    • Bureau Insider
    • Power Bi
    • Skype
    • Serveur SQL
    • Équipes
  • FENÊTRES
    • Centre d'administration Windows
    • Client Windows
    • Serveur Windows
  • Liste de collecte de requêtes SCCM
Linux

How to Check Timezone in Linux

Publié: Février 4, 2024
2 Lecture minimale
PARTAGER

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, y compris date et 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: Le date Command:

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

date

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

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

Par exemple:

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, le /etc/localtime file serves as a symbolic link to the actual time zone file located within the /usr/share/zoneinfo annuaire.

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
ÉTIQUETÉ:AlmaruxCentosLinuxUbuntu
Article suivant Liste de collecte de requêtes Configuration Manager System Center Configuration Manager Technical Preview Update 1611
Laisser un commentaire Laisser un commentaire

Laisser une réponse Annuler la réponse

Votre adresse email ne sera pas publiée. Les champs obligatoires sont marqués *

Ce site utilise Akismet pour réduire le spam. Découvrez comment les données de vos commentaires sont traitées.

Traduction

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

Articles populaires

Configuration système requise pour Windows Server 2016
Serveur Windows
Liste de collecte de requêtes Configuration Manager
Liste de collecte de requêtes Configuration Manager
Configmgr
Navigation structurée/gérée activée sur les pages modernes dans les sites d'équipe classiques
Technologie
SCCM n'a pas réussi à obtenir les emplacements DP comme version attendue de MP
Configmgr

Messages récents

Installation et configuration de Fail2ban pour la protection SSH sur Ubuntu 24.04
Linux
Activation et configuration de FirewallD sur AlmaLinux
Linux
Création d'utilisateur et configuration de la clé SSH dans AlmaLinux
Linux
Comment réinitialiser le mot de passe sur AlmaLinux
Linux

© 2023 Entérin

Aller à la version mobile
Content de te revoir!

Connectez-vous à votre compte

Nom d'utilisateur ou adresse e-mail
Mot de passe

Vous avez perdu votre mot de passe?