How to install networked HP printer and scanner on Ubuntu Linux

Installing networked HP printer and scanner on Ubuntu Linux
You can download software by visiting this page . However, Ubuntu Linux includes software in its repository too. So we are going to use the official Ubuntu repo.

Step 1 – Update Ubuntu Linux
Simply run apt command:
sudo apt update
sudo apt upgrade

Step 2 – Search for HPLIP software
Search for HPLIP, run the following apt-cache command or apt-get command:
apt-cache search hplip

Here is what I see:

hplip – HP Linux Printing and Imaging System (HPLIP)
hplip-data – HP Linux Printing and Imaging – data files
hplip-doc – HP Linux Printing and Imaging – documentation
libhpmud-dev – HP Multi-Point Transport Driver (hpmud) development libraries
libhpmud0 – HP Multi-Point Transport Driver (hpmud) run-time libraries
libsane-hpaio – HP SANE backend for multi-function peripherals
openprinting-ppds – OpenPrinting printer support – PostScript PPD files
printer-driver-hpcups – HP Linux Printing and Imaging – CUPS Raster driver (hpcups)
printer-driver-hpijs – HP Linux Printing and Imaging – printer driver (hpijs)
printer-driver-pxljr – printer driver for HP Color LaserJet 35xx/36xx
hpijs-ppds – HP Linux Printing and Imaging – HPIJS PPD files
hplip-gui – HP Linux Printing and Imaging – GUI utilities (Qt-based)
Why use hp-lip over the inbuilt printer and scanner option?
If you’re using a newer version of Ubuntu Linux, it may come with an automatic HP printer or scanner driver. However, this driver may not work properly with older or newer HP models. That’s where hp-lip comes in handy. By installing this open-source software, you’ll have access to more options and settings like duplex printing, firmware updates, and checking ink levels. It’s definitely worth your time to install hp-lip for a better printing and scanning experience.

Step 3 – Installing HPLIP on Ubuntu Linux 16.04/18.04/20.04/22.04 LTS or above
We are going to install hplip-gui and hplip using the apt command:
sudo apt install hplip hplip-gui

A note about installing latest version of hplip
Ubuntu or Debian versions are always behind the official hplip version. You maay need the latest version of hplip, if you have the latest brand new HP printer or, in some cases, an older printer to get all features and drivers support. You can download the latest version by visiting the following URL:
Click on the download HPLIP. Choose your Linux distro version. Also, download Digital Certificate from the same site. Here are two files I downloaded:
ls -l hplip-*

Outputs indicating that I’ve downloaded hplip version 3.23.3:

-rw-rw-r– 1 vivek vivek 29456243 May 13 22:24
-rw-rw-r– 1 vivek vivek 195 May 13 22:25
Next, import GPG key for verification:
/usr/bin/gpg –keyserver –recv-keys 0xA59047B9

gpg: key 73D770CDA59047B9: public key “HPLIP (HP Linux Imaging and Printing)” imported
gpg: Total number processed: 1
gpg: imported: 1
Then verify it:
/usr/bin/gpg –verify

Outputs (look for “Good signature” line and you can ignore WARNING as you have not trusted this key):

gpg: Signature made Thursday 27 October 2022 06:47:35 PM IST
gpg: using DSA key 4ABA2F66DBD5A95894910E0673D770CDA59047B9
gpg: Good signature from “HPLIP (HP Linux Imaging and Printing)” [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 4ABA 2F66 DBD5 A958 9491 0E06 73D7 70CD A590 47B9
Finally, install it:
sudo apt remove hplip hplip-gui
sudo apt –purge autoremove
chmod +x -v
mode of ‘’ changed from 0664 (rw-rw-r–) to 0775 (rwxrwxr-x)

Step 4 – Configure HP printer on Ubuntu Linux
You need to run hp-setup command which set up HPLIP printers and faxes in the CUPS spooler. Tries to automatically determine the correct PPD file to use. Allows the printing of a test page. Performs basic fax parameters set up too. However, first turn on the printer. Set up HP printer in Ubuntu Linux using GUI, run.

If you have a USB based HP printer, try:
hp-setup -b usb

For example, my printer is networked and it has IP address, so I run:

One can use FQDN too:
hp-setup hp0.sweet.home

Ubuntu Linux Set up HP using GUI and IP address
Next, I will set description, name, FAX number (if any) and other information for my HP printer. Finally, click on the “Add Printer” button:
Ubuntu Linux HP Device Manager
If you get permission error, then make sure your username is part of the lpadmin group. To add user to a group, run the following usermod command in your terminal session:
sudo usermod -aG lpadmin {Your_Username_Here}
sudo usermod -aG lpadmin vivek

Log out and log in again or simply reboot the box. Now you can run the hp-setup command again.

How do I control my HP printer with “HP Device Manager”?
The HP Device Manager (aka “Toolbox”) for HPLIP supported devices such as printers and scanners. It provides access to status of printer, tools, ink/supplies levels and more. Simply type the following command:

How to control HP printer from GUI on Ubuntu Linux
Installing HP Proprietary plugin
You may need to run the following command to install HP Proprietary plugin in-order to work with scanner. Here is how to install it:

Run in graphical UI mode:

hp-plugin -g

Run in interactive text UI mode:

hp-plugin -i

If you get an error resolving by gpg, add the following entry to /etc/hosts and re-run the hp-plugin again:

needed for hp-plug mapped to
Try again:
hp-plugin -i
How do I scan images on Linux?
Try using Document Scanner (old name Simple Scan). It is a document scanning application for GNOME desktop. It allows you to capture images using image scanners that have suitable SANE drivers installed. For example flatbed scanners:
Simple scan running on Fedora desktop
Click on the Scan button to start scanning.

Using HP toolbox to scan
Open the HP toolbox (HP Device Manager) installed by the hp-lip. Choose your multi-functional all-in-one device > Click on Action tab > Choose Scan App:
Click to enlarge

You will get the SANE scanner app opened on your Ubuntu Linux as follows:
Now all you have to do is set a scanning option like color or gray scan, file name, and other settings per your needs. Finally, click on the Scan button.
Troubleshooting tips
Is your scanner or printer not detected? Are you facing problems with the hp-setup command? Turn on debug mode that tells you about missing files or libraries. For example:
hp-setup -g
hp-setup -g -b usb
hp-setup -g

Here is how to log errors into a text file:
hp-setup -g &> ~/error.log

Then read it using a text editor or cat command or more command:
more ~/error.log

How do I find supported USB, parallel, and network attached printers?
Use the printer discovery command-line utility. The syntax is as follows:

Linux all devices on the network:

hp-probe -bnet

Search all devices on USB that support scanning:

hp-probe -busb -escan

Search and list all devices that have queues installed in CUPS:

hp-probe -bcups

Try to search all devices on the USB bus:


Leave a Comment