hwstamp_ctl command not found

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

Introduction

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

hwstamp_ctl: command not found

or when using sudo you get the following error message

sudo: hwstamp_ctl: command not found

Solutions to hwstamp_ctl: command not found

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

In Ubuntu hwstamp_ctl is provided by linuxptp package.

linuxptp is:

Linuxptp is an implementation of the Precision Time Protocol (PTP) according to IEEE standard 1588 for Linux. Features include:

  • support for hardware and software time stamping via the Linux SO_TIMESTAMPING socket option.
  • support for the Linux PTP Hardware Clock (PHC) subsystem by using the clock_gettime family of calls, including the new clock_adjtimex system call
  • implementation of Boundary Clock (BC) and Ordinary Clock (OC)
  • transport over UDP/IPv4, UDP/IPv6, and raw Ethernet (Layer 2)
  • support for IEEE 802.1AS-2011 in the role of end station

PTP provides higher precision and faster synchronization than NTP even without hardware support. With hardware support, sub-microsecond accuracy can be expected. Whereas NTP is intended for WAN use, PTP is designed for LAN environments and makes use of UDP multicast.

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

sudo apt-get -y install linuxptp

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

You can also use apt command to install linuxptp.

sudo apt -y install linuxptp

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

sudo aptitude install linuxptp

Summary

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