How To Install linuxptp on Ubuntu 18.04
Introduction
In this tutorial we learn how to install linuxptp on Ubuntu 18.04.
What is linuxptp
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.
There are three methods to install linuxptp on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install linuxptp Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install linuxptp using apt-get by running the following command:
sudo apt-get -y install linuxptp
Install linuxptp Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install linuxptp using apt by running the following command:
sudo apt -y install linuxptp
Install linuxptp Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.
sudo aptitude update
After updating apt database, We can install linuxptp using aptitude by running the following command:
sudo aptitude -y install linuxptp
How To Uninstall linuxptp on Ubuntu 18.04
To uninstall only the linuxptp package we can use the following command:
sudo apt-get remove linuxptp
Uninstall linuxptp And Its Dependencies
To uninstall linuxptp and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove linuxptp
Remove linuxptp Configurations and Data
To remove linuxptp configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge linuxptp
Remove linuxptp configuration, data, and all of its dependencies
We can use the following command to remove linuxptp configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge linuxptp
References
Summary
In this tutorial we learn how to install linuxptp package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.