timedatectl: command not found

33,328

As suggested in the comment, installed systemd package:

> apt-get install systemd

timedatectl is installed

Share:
33,328
GabrieleMartini
Author by

GabrieleMartini

"A smooth sea never made a skilled sailor." [Franklin D. Roosevelt]

Updated on September 18, 2022

Comments

  • GabrieleMartini
    GabrieleMartini over 1 year

    The scenario: I'm trying to set timezone on a docker container based on Ubuntu 18.04 docker image. Just pull the image and updated

    > apt-get -y update
    

    The error:

    When run

    > timedatectl
    

    I get

    > timedatectl: command not found
    

    The question: How to install timedatectl?

    What I've tried so far: I tried to install timedatectl as follows

    > apt-get -y install timedatectl
    > Unable to locate package timedatectl
    

    Thank you

    • FedKad
      FedKad over 4 years
      timedatectl is part of systemd package.
    • damadam
      damadam over 4 years
      If you had installed ntpdate, it disabled timedatectl because it could disabled some services tha use systemd in case of update