Installing HPLIP for CUPS on a Raspberry Pi

If you have a HP printer or scanner and you want to be able to use it on your Raspberryi Pi running the Raspbian operating system, you`ll have to install HP Linux Imaging and Printing and CUPS.

In the terminal run the following commands:

sudo su
apt-get update
apt-get install hplip cups
usermod -a -G lpadmin pi

In a browser, on the raspberry pi you can now access the CUPS configuration screen at

If you also would like to use your MFP/scanner also run the following commands in the terminal:

apt-get install sane

The configuration and applications are up to you, the requirements are now installed.

How-To Raspberry Pi print server (with AirPrint)

This guide demonstrates how to turn your Raspberry Pi into a print server, with AirPrint support

First step is to install CUPS and related plugins

sudo apt-get install cups cups-pdf gutenprint pycups avahi python2 python-cups
sudo usermod -aG lpadmin pi
sudo /etc/init.d/cups start

Second step is to fully integrate AirPrint

sudo apt-get install avahi-daemon avahi-discover libnss-mdns
sudo mkdir /opt/airprint
cd /opt/airprint
sudo wget -O --no-check-certificate
sudo chmod 755
sudo ./ -d /etc/avahi/services
sudo /etc/init.d/avahi-daemon start
echo “image/urf urf (0,UNIRAST)” > /usr/share/cups/mime/apple.types
echo “image/urf application/vnd.cups-postscript 66 pdftops” > /usr/share/cups/mime/local.convs

Step is is to install  Samba (for compatibility with Windows PCs)

sudo apt-get install samba
sudo /etc/init.d/samba start

If you have a special printer, like I do you might want to install the following extras:

sudo apt-get install foo2hp
sudo apt-get install HPLIP