Використовуючи цей сайт, ви погоджуєтеся з Політика конфіденційності.
прийняти
ЕнтеринЕнтеринЕнтерин
  • ДІМ
  • Це про
  • ТЕХ
  • Microsoft
    • Лазурний
    • Configmgr/sccm
    • DPM
    • Оркестрант
    • Гіпер-V
    • Інсайдер Microsoft Edge
    • MSI
    • Офіс 365
    • Інсайдер Office
    • Потужність BI
    • Скайп
    • SQL Server
    • Команди
  • ВІКНА
    • Центр адміністрування Windows
    • Клієнт Windows
    • Windows Server
  • Список колекції запитів SCCM
Читання: How to Check Timezone in Linux
Зміна розміру шрифтуАа
ЕнтеринЕнтерин
Зміна розміру шрифтуАа
  • ДІМ
  • Це про
  • ТЕХ
  • Microsoft
  • ВІКНА
  • Список колекції запитів SCCM
Пошук
  • ДІМ
  • Це про
  • ТЕХ
  • Microsoft
    • Лазурний
    • Configmgr/sccm
    • DPM
    • Оркестрант
    • Гіпер-V
    • Інсайдер Microsoft Edge
    • MSI
    • Офіс 365
    • Інсайдер Office
    • Потужність BI
    • Скайп
    • SQL Server
    • Команди
  • ВІКНА
    • Центр адміністрування Windows
    • Клієнт Windows
    • Windows Server
  • Список колекції запитів SCCM
Лінійка

How to Check Timezone in Linux

Опублікований: Лютий 4, 2024
2 Хв. читання
ПОДІЛИТИСЯ

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 і 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: З date Command:

To reveal the current time zone using the classic date command, 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.

Наприклад:

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)/Центоси 7 and Fedora versions 25-22, the /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
ПОМІЧЕНО:АльмаркЦентосиЛінійкаUbuntu
Наступна стаття Список колекції запитів диспетчера конфігурацій System Center Configuration Manager Technical Preview Update 1611
Залиште коментар Залиште коментар

Залиште відповідь Скасувати відповідь

Ваша електронна адреса не буде опублікована. Обов'язкові поля позначені *

Цей сайт використовує Akismet для зменшення спаму. Дізнайтеся, як обробляються дані ваших коментарів.

Переклад

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

Популярні публікації

Системні вимоги для Windows Server 2016
Windows Server
Список колекції запитів диспетчера конфігурацій
Список колекції запитів диспетчера конфігурацій
Configmgr
Структуровану/керовану навігацію ввімкнено на сучасних сторінках класичних сайтів групи
техн
SCCM Не вдалося отримати розташування DP як очікувану версію від MP
Configmgr

Останні дописи

Встановлення та налаштування Fail2ban для захисту SSH на Ubuntu 24.04
Лінійка
Увімкнення та налаштування FirewallD на AlmaLinux
Лінійка
Створення користувача та налаштування ключа SSH в AlmaLinux
Лінійка
Як скинути пароль на AlmaLinux
Лінійка

© 2023 Ентерин

Перейдіть до мобільної версії
Ласкаво просимо назад!

Увійдіть у свій обліковий запис

Ім'я користувача або адреса електронної пошти
Пароль

Забули пароль?