lpq command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
lpq: command not found
or when using sudo you get the following error message
sudo: lpq: command not found
Solutions to lpq: command not found
How To Fix lpq: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu lpq is provided by cups-bsd package.
cups-bsd is:
The Common UNIX Printing System (or CUPS(tm)) is a printing system and general replacement for lpr, lpd and the like. It supports the Internet Printing Protocol (IPP), and has its own filtering driver model for handling various document types.
This package provides the BSD commands for interacting with CUPS. It is provided separately to allow CUPS to coexist with other printing systems (to a small degree).
To fix this problem, we can install more using the command below.
sudo apt-get -y install cups-bsd
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install cups-bsd.
sudo apt -y install cups-bsd
Or if you have aptitude installed you can use the following command.
sudo aptitude install cups-bsd
Summary
In this tutorial we learn how to fix lpq command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.