faketime command not found

In this troubleshooting guide we learn how to fix faketime command not found error message

Introduction

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

faketime: command not found

or when using sudo you get the following error message

sudo: faketime: command not found

Solutions to faketime: command not found

How To Fix faketime: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu faketime is provided by faketime package.

faketime is:

The Fake Time Preload Library (FTPL, a.k.a. libfaketime) intercepts various system calls which programs use to retrieve the current date and time. It can then report faked dates and times (as specified by you, the user) to these programs. This means you can modify the system time a program sees without having to change the time system-wide. FTPL allows you to specify both absolute dates (e.g., 2004-01-01) and relative dates (e.g., 10 days ago).

This package contains a “faketime” binary that makes it easy to use the LD_PRELOAD library.

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

sudo apt-get -y install faketime

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

You can also use apt command to install faketime.

sudo apt -y install faketime

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

sudo aptitude install faketime

Summary

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