How To Set Up An HP Printer On Linux With HPLIP (2026)

Quick answer

  • On Ubuntu or Debian, check for HPLIP with dpkg -l hplip, then connect the printer and run sudo hp-setup -a for a USB printer.
  • If the setup shows a warning about multiple possible PPD files, choose the option that best matches your printer model, then check that a test page prints.
  • Some HP printers also need a proprietary plug-in, which hp-setup downloads when it is needed after you accept the licence agreement.

Applies to: HP printers on Linux with HPLIP (HP Linux Imaging and Printing); steps from HP’s developer pages

HP printers on Linux are set up with HPLIP, HP’s own Linux printing software, and its hp-setup tool.

Many distributions already include HPLIP, so the first job is to check whether it is installed.

This guide follows HP’s installation pages and covers USB setup, network printers and the plug-in some models need.

Table of Contents

Quick answer: set up an HP printer with HPLIP

StepCommand or action
Check HPLIP (Debian, Ubuntu)dpkg -l hplip, and look for ii in the first column.
Check HPLIP (Fedora, SUSE, RHEL)rpm -qa hplip
Add a USB printerhp-setup, or sudo hp-setup -a on Ubuntu.
Printer needs a plug-inhp-setup downloads it; or run hp-plugin.

Check whether HPLIP is already installed

HP’s installation how-to gives a different check for each family of distributions.

On Debian and Ubuntu based systems, run this command in a terminal:

dpkg -l hplip

This lists the hplip package, and if the first column before hplip shows ii, HPLIP is installed and you can run hp-setup.

On RPM based systems such as Fedora, SUSE and RHEL, run this instead:

rpm -qa hplip

If the output lists hplip with a version number, it is installed.

HP advises using the pre-packaged version from your distribution if it is new enough for your printer, and downloading HPLIP from HP’s site only if it is not.

To see whether your printer needs a newer version, check the Supported Devices page on HP’s site.

If HPLIP came with your distribution

HP warns that if HPLIP came preinstalled or from an RPM, DEB or other package, you must uninstall that version using your distribution’s method before installing a newer one.

Otherwise you may get package conflicts or features that do not work.

HP’s automatic installer handles part of this itself, because it removes previous HPLIP and HPOJ installations, asks you to confirm your Linux distribution and runs hp-setup when it finishes.

Add a USB printer with hp-setup

  1. Connect the printer and turn it on, following your printer’s documentation for the cable.
  2. Open a terminal.
  3. Run the setup tool as shown below.
  4. Follow the prompts to finish setting up the printer.
  5. Check that the printer prints a test page, which HP says shows it is configured correctly.
hp-setup

This starts the setup and asks for the details, and HP says to log in as the superuser first on distributions other than Ubuntu and Debian.

sudo hp-setup -a

This is HP’s Ubuntu version, and the -a option runs automatic setup with a default name and settings instead of prompting for them.

If you see a warning that multiple possible PPD files were found, HP says it is expected in some cases and you should select the option that best matches your printer model.

If the printer can fax, complete the fax configuration when prompted.

Network printers and the firewall

HPLIP uses discovery protocols to find networked printers, and HP lists them as Avahi, SLP and mDNS/Bonjour.

HP says that on OpenSUSE and RHEL the firewall may block these by default.

ProtocolPortHP’s instruction
mDNS/BonjourUDP 5353OpenSUSE: add a custom rule in the YaST firewall. RHEL: Firewall Configuration, Public, Ports, Add, enter 5353, choose udp, save.
SLPUDP 427OpenSUSE: add a custom rule the same way as for mDNS.
AvahiAllowed serviceOpenSUSE: allow Zeroconf/Bonjour Multicast DNS under Allowed Services.

Install the HP plug-in if your printer needs it

HP says some printers need a proprietary binary plug-in for full features or better performance.

One plug-in file per HPLIP release covers all plug-in enabled devices, and most distributions ship HPLIP without it.

  1. Run hp-setup in a terminal.
  2. Select your connection type and click Next.
  3. Select your printer and click Next.
  4. Enter the root password and click Next.
  5. Use the recommended installation method and click Next.
  6. Accept the Driver Plug-In License Agreement and click Next.
  7. Finish the setup, and re-enter your user name and password if asked.

For the plug-in only, run hp-plugin, which downloads and installs it but does not create a printer queue, and you may need to run it as root.

Two Photosmart models need a setting changed first

HP says the Photosmart A530 and A630 have a software install mode that makes the unit appear as a CD-ROM in Windows.

It must be turned off before installing on Linux, with the power plugged in and the USB cable not yet connected.

ModelWhere to turn it off
Photosmart A530Menu, left twice and print/ok for tools, left four times to software install mode, make sure off is checked.
Photosmart A630Setup (wrench icon), preferences, scroll to software install mode, confirm off is checked.

A note on HP’s pages

HP’s developer pages use old example version numbers, so replace them with the version you actually download.

HP’s own step list points to its Downloads page, and our Ubuntu apps and .deb guide covers installing packages.

If your printer is not an HP, or hp-setup does not list it, see our guide to adding a printer on Ubuntu.

Official sources

Leave a Reply

Your email address will not be published. Required fields are marked *