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
- Check whether HPLIP is already installed
- If HPLIP came with your distribution
- Add a USB printer with hp-setup
- Network printers and the firewall
- Install the HP plug-in if your printer needs it
- Two Photosmart models need a setting changed first
- A note on HP’s pages
- Official sources
- More printer guides
Quick answer: set up an HP printer with HPLIP
| Step | Command 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 printer | hp-setup, or sudo hp-setup -a on Ubuntu. |
| Printer needs a plug-in | hp-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:
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:
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
- Connect the printer and turn it on, following your printer’s documentation for the cable.
- Open a terminal.
- Run the setup tool as shown below.
- Follow the prompts to finish setting up the printer.
- Check that the printer prints a test page, which HP says shows it is configured correctly.
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.
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.
| Protocol | Port | HP’s instruction |
|---|---|---|
| mDNS/Bonjour | UDP 5353 | OpenSUSE: add a custom rule in the YaST firewall. RHEL: Firewall Configuration, Public, Ports, Add, enter 5353, choose udp, save. |
| SLP | UDP 427 | OpenSUSE: add a custom rule the same way as for mDNS. |
| Avahi | Allowed service | OpenSUSE: 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.
- Run hp-setup in a terminal.
- Select your connection type and click Next.
- Select your printer and click Next.
- Enter the root password and click Next.
- Use the recommended installation method and click Next.
- Accept the Driver Plug-In License Agreement and click Next.
- 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.
| Model | Where to turn it off |
|---|---|
| Photosmart A530 | Menu, left twice and print/ok for tools, left four times to software install mode, make sure off is checked. |
| Photosmart A630 | Setup (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
- HP: HPLIP installation how-tos
- HP: Installation step 4, hp-setup for USB printers
- HP: Installation step 3, download and install HPLIP
More printer guides
- How To Fix A Printer That Won't Print In Color (2026)
- Epson Printer Error: Turn The Power Off And On Again (2026)
- How To Install The Rollo USB Printer Driver On A Mac (2026)
- How To Fix A Zebra Printer Showing As Unspecified Device (2026)
- How To Download And Install A Zebra Printer Driver (2026)
- How To Download And Install A Kyocera Printer Driver (2026)
See all: Printer Guides