faketime

Fake the system time for a given command. More information: <https://manned.org/faketime>.

Install

All systems
curl cmd.cat/faketime.sh
Debian Debian
apt-get install faketime
Ubuntu
apt-get install faketime
Arch Arch Linux
pacman -S faketime
image/svg+xml Kali Linux
apt-get install faketime
Fedora
dnf install faketime
Windows (WSL2)
sudo apt-get update sudo apt-get install faketime
OS X
brew install faketime
Raspbian
apt-get install faketime

Fake the system time for a given command. More information: <https://manned.org/faketime>.

  • Fake the time to this evening, before printing the result of `date`:
    faketime 'today 23:30' date
  • Open a new `bash` shell, which uses yesterday as the current date:
    faketime 'yesterday' bash
  • Simulate how a program would act next Friday night:
    faketime 'next Friday 1 am' path/to/program

© tl;dr; authors and contributors