lp command not found

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

Introduction

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

lp: command not found

or when using sudo you get the following error message

sudo: lp: command not found

Solutions to lp: command not found

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

In Ubuntu lp is provided by cups-client package.

cups-client is:

The Common UNIX Printing System (or CUPS(tm)) is a printing system and general replacement for 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 System V style print client programs.

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

sudo apt-get -y install cups-client

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

You can also use apt command to install cups-client.

sudo apt -y install cups-client

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

sudo aptitude install cups-client

Summary

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