htpdate command not found

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

Introduction

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

htpdate: command not found

or when using sudo you get the following error message

sudo: htpdate: command not found

Solutions to htpdate: command not found

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

In Ubuntu htpdate is provided by htpdate package.

htpdate is:

The HTTP Time Protocol (HTP) is used to synchronize a computer’s time with web servers as reference time source. This program can be used instead ntpdate or similar, in networks that has a firewall blocking the NTP port.

Htpdate will synchronize the computer time to Greenwich Mean Time (GMT), using the timestamps from HTTP headers found in web servers response (the HEAD method will be used to get the information).

Htpdate works through proxy servers. Accuracy of htpdate will be usually within 0.5 seconds (better with multiple servers).

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

sudo apt-get -y install htpdate

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

You can also use apt command to install htpdate.

sudo apt -y install htpdate

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

sudo aptitude install htpdate

Summary

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