• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

ntpq: command not found

by Deepika

ntpq is a Linux utility that is used to query the Network Time Protocol (NTP) daemon and to display information about the NTP associations and the state of the NTP clock. NTP is a protocol used to synchronize the clocks of networked systems to within a few milliseconds of each other.

ntpq is used to query the NTP daemon and display information about the NTP associations that the daemon has established with remote NTP servers. This information includes the status of each association, the address and stratum of each remote server, and the current time offset between the local clock and each remote server.

ntpq can also be used to display information about the state of the NTP clock, including the estimated accuracy of the clock, the current time, and the status of the clock discipline algorithm.

If you encounter the below error while running the command ntpq:

ntpq: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install ntp
Ubuntu apt-get install ntp
Arch Linux pacman -S ntp
Kali Linux apt-get install ntp
CentOS yum install ntp
Fedora dnf install ntp
OS X brew install ntp
Raspbian apt-get install ntp

ntpq Command Examples

1. Start `ntpq` in interactive mode:

# ntpq --interactive

2. Print a list of NTP peers:

# ntpq --peers

3. Print a list of NTP peers without resolving hostnames from IP addresses:

# ntpq --numeric --peers

4. Use `ntpq` in debugging mode:

# ntpq --debug-level

5. Print NTP system variables values:

# ntpq --command=rv

Filed Under: Linux

Some more articles you might also be interested in …

  1. Beginners Guide to NFS in CentOS / RHEL
  2. lscpu: command not found
  3. blkid Command Examples in Linux
  4. CentOS / RHEL : How to add a null route in Linux
  5. dracut: command not found
  6. lvdisplay error: “Failed to create directory /var/lock/lvm. File-based locking initilisation failed.”
  7. How to Force ASM to Scan the Multipathed Device First using ASMLIB/oracleasm
  8. chronyc Command Examples in Linux
  9. How to use shell aliases in Linux
  10. a2ensite: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright