fake-hwclock command not found

In this troubleshooting guide we learn how to fix fake-hwclock command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

fake-hwclock: command not found

or when using sudo you get the following error message

sudo: fake-hwclock: command not found

Solutions to fake-hwclock: command not found

How To Fix fake-hwclock: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu fake-hwclock is provided by fake-hwclock package.

fake-hwclock is:

Some machines don’t have a working realtime clock (RTC) unit, or no driver for the hardware that does exist. fake-hwclock is a simple set of scripts to save the kernel’s current clock periodically (including at shutdown) and restore it at boot so that the system clock keeps at least close to realtime. This will stop some of the problems that may be caused by a system believing it has travelled in time back to 1970, such as needing to perform filesystem checks at every boot.

On top of this, use of NTP is still recommended to deal with the fake clock “drifting” while the hardware is halted or rebooting.

To fix this problem, we can install more using the command below.

sudo apt-get -y install fake-hwclock

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install fake-hwclock.

sudo apt -y install fake-hwclock

Or if you have aptitude installed you can use the following command.

sudo aptitude install fake-hwclock

Summary

In this tutorial we learn how to fix fake-hwclock command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.