Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Distributions»Debian»How to Change Time Zone in Debian Linux

    How to Change Time Zone in Debian Linux

    RahulBy RahulMay 5, 20182 Mins ReadUpdated:March 26, 2022

    Every operating system has a default time zone configured. Sometimes users are required to change the default timezone to some other timezone as per their requirements on the Linux system. This tutorial will help to change the timezone on Debian 11, Debian 10, and Debian 9 systems.

    Check Current Timezone

    You can view the current time zone of a system by simply typing the ‘date’ command in the terminal.

    date 
    
    Output:
    Sat 26 Mar 2022 05:43:11 AM UTC

    The above command shows that this system is running in the UTC timezone.

    You can also refer to the timedatectl command to view the details output of the current system time, timezone, and many other details.

    timedatectl 
    
    Output:
    Local time: Sat 2022-03-26 05:43:49 UTC Universal time: Sat 2022-03-26 05:43:49 UTC RTC time: Sat 2022-03-26 05:43:48 Time zone: Etc/UTC (UTC, +0000) System clock synchronized: no NTP service: n/a RTC in local TZ: no

    Set or Change Time Zone in Linux

    The Linux keeps time zone relegated files are available under /usr/share/zoneinfo directory. There you can find all the available time zone.

    You can choose one of the below methods to change the Linux system time zone via the command line.

    • Method 1 – Using timedatectl command (Recommended)

      Use of timedatectl command is the proffered way to set or change the time zone on a Linux system. You can list all the available timezones with the following command.

      timedatectl list-timezones 
      

      Find out the correct time zone for your system in the above result. Next, use the following command to set a new time zone to the Linux system.

      sudo timedatectl set-timezone "America/Los_Angeles" 
      
    • Method 2 – Using /etc/localtime Symlink

      You can also change the system time by changing the symbolic link of /etc/localtime file on Linux systems. You just need to search for the correct time zone files under /usr/share/zoneinfo directory.

      First rename of remove the current file:

      sudo mv /etc/localtime /etc/localtime-old
      

      Then change the symbolic link of file to the correct time zone configuration file:

      sudo ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime 
      
    • The system will automatically adjust the new time based on the new time zone set on the system. You can again run “timedatectl” command to confirm the time zone is updated correctly.

    Conclusion

    This tutorial guide you to set or change timezone on a Debian Linux system.

    date time timezone
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install Spotify on Ubuntu & LinuxMint
    Next Article Zstandard – A faster data compression tool

    Related Posts

    How to Change TimeZone in Azure App Service

    Updated:April 16, 20223 Mins Read

    How to Create a Sudo User in Debian

    Updated:June 26, 20212 Mins Read

    How To Install XRDP (Remote Desktop) on Debian 10

    4 Mins Read

    Initial Server Setup with Debian 10/9/8

    Updated:June 25, 20214 Mins Read

    How To Install and Configure VNC Server on Debian 10

    Updated:June 26, 20215 Mins Read

    How to Install TeamViewer on Debian 10

    3 Mins Read

    1 Comment

    1. Werner on November 16, 2020 8:27 pm

      I think “dpkg-reconfigure tzdata” is the Debian way of changing the timezone

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    • How To Install PHP (8.1, 7.4 or 5.6) on Ubuntu 22.04
    • (Resolved) Please install all available updates for your release before upgrading
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.