By using this site, you agree to the Privacy Policy.
Accept
EnterinITEnterinITEnterinIT
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Reading: How to Check Timezone in Linux
Font ResizerAa
EnterinITEnterinIT
Font ResizerAa
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
  • WINDOWS
  • SCCM Query Collection List
Search
  • HOME
  • IT PRO
  • TECH
  • MICROSOFT
    • Azure
    • ConfigMgr/SCCM
    • DPM
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Office 365
    • Office Insider
    • Power BI
    • Skype
    • SQL Server
    • Teams
  • WINDOWS
    • Windows Admin Center
    • Windows Client
    • Windows Server
  • SCCM Query Collection List
Linux

How to Check Timezone in Linux

Published: February 4, 2024
2 Min Read
SHARE

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 and 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 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.

For example:

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, 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
TAGGED:AlmaLinuxCentOSLinuxUbuntu
Next Article Configuration Manager Query Collection List System Center Configuration Manager Technical Preview Update 1611
Leave a Comment Leave a Comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Translation

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

Popular Posts

System Requirements for Windows Server 2016
Windows Server
Configuration Manager Query Collection List
Configuration Manager Query Collection List
ConfigMgr
Structured/Managed Navigation enabled on Modern Pages in Classic Team Sites
Tech
SCCM Failed to get DP locations as the expected version from MP
ConfigMgr

Recent Posts

Installing and Configuring Fail2ban for SSH Protection on Ubuntu 24.04
Linux
Enabling and Configuring FirewallD on AlmaLinux
Linux
User Creation and SSH Key Setup in AlmaLinux
Linux
How to reset password on AlmaLinux
Linux

© 2023 EnterinIT

Go to mobile version
Welcome Back!

Sign in to your account

Username or Email Address
Password

Lost your password?