1

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

2
  • 2
    timedatectl is part of systemd package. – FedonKadifeli Nov 22 '19 at 9:28
  • If you had installed ntpdate, it disabled timedatectl because it could disabled some services tha use systemd in case of update – damadam Nov 22 '19 at 9:33
3

As suggested in the comment, installed systemd package:

> apt-get install systemd

timedatectl is installed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.