Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

How Do I Install HP Printer on Linux?

My printer and scanner are both HP Officejet Pro models. How do I set up Ubuntu Linux to operate with HP Officejet Pro network printers and scanners? How can I install the HP printer on the Ubuntu Linux operating system?

To begin, you will need to install the programme known as HPLIP, which stands for HP Linux Imaging and Printing. This is the official software for HP printers, and it is compatible with a wide variety of models, including Deskjet, Officejet, Photosmart, PSC, Business Inkjet, OfficeJet, and LaserJet, among others. Both colour and black-and-white scanning are supported by the programme while running Ubuntu Linux. This article provides instructions for installing an HP printer and scanner using the Ubuntu Linux operating system.

Installing networked HP printer and scanner on Ubuntu Linux

Simply visit this page to begin the software download process. However, Ubuntu Linux also has applications in its own internal repository. Therefore, we will make use of the official Ubuntu repository.

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

What I see is as follows:

How do I install HP printer on Linux?

Step 3 – Installing HPLIP on Ubuntu Linux 16.04/18.04/20.04/22.04 LTS or above

Using the apt command, we are going to install hplip and hplip-gui as follows:

sudo apt install hplip hplip-gui


Step 4 – Configure HP printer on Ubuntu Linux

In order to configure HPLIP printers and faxes in the CUPS spooler, you will need to execute the hp-setup command. It makes an attempt to identify automatically the PPD file that should be used. Activating this feature enables the printing of a test page. In addition, it sets up the fundamental fax settings. However, you should begin by turning on the printer. Set up HP printer on Ubuntu Linux using GUI, run.


If you have a USB based HP printer, try:

hp-setup -b usb

For instance, my printer is connected to the network, and its IP address is; thus, I do the following:


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

Following that, I will configure several aspects of my HP printer, such its name, description, and FAX number (if it has one). Click the “Add Printer” button at the bottom of the window.

In the event that you get a permission problem, check to see whether your user name is included in the lpadmin group. In order to add a user to a group, perform the usermod command that is detailed below in your terminal session:

sudo usermod -aG lpadmin {Your_Username_Here}
sudo usermod -aG lpadmin vivek

Log out and log in again or just reboot the machine. Now you may run the hp-setup command again.

How do I control my HP printer with “HP Device Manager”?

The HP Device Manager, sometimes known as the “Toolbox,” is compatible with HPLIP-supported hardware such printers and scanners. It provides access to information on the state of the printer, tools, the amount of ink and supplies, and more. Simply enter this command into the search bar:


Video Guide


You were shown on this page how to install an HP network printer on Ubuntu Linux and how to manage it by making use of graphical user interface commands.

Leave a Reply

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