Jun 26, 2024 7 min read

How to Install HPLIP on Ubuntu 22.04

Install HPLIP on Ubuntu 22.04 with our step-by-step tutorial. HPLIP is HP's software for efficient printing and scanning on Linux systems.

Install HPLIP on Ubuntu 22.04
Install HPLIP on Ubuntu 22.04
Table of Contents

Introduction

Before we begin talking about how to install HPLIP on Ubuntu 22.04, let's briefly understand – What is HPLIP?

HPLIP, which stands for HP Linux Imaging and Printing, is a software developed by HP to provide efficient printing and scanning capabilities for Linux users. With HPLIP, Linux users can seamlessly connect their HP printers and scanners to their devices and take advantage of various printing and scanning features.

The software ensures compatibility between HP devices and Linux systems, allowing users to easily configure and manage printing tasks. HPLIP supports a wide range of HP printers and scanners, making it a versatile solution for Linux users seeking reliable and user-friendly printing and scanning functionality.

In this tutorial, you will install HPLIP on Ubuntu 22.04. We will also address a few FAQs on how to install HPLIP on Ubuntu 22.04.

Advantages of HPLIP

  1. Seamless Integration: HPLIP allows for effortless connection and compatibility between HP printers and scanners with Linux systems.
  2. Easy Configuration: Users can easily configure and manage printing tasks, simplifying the printing process.
  3. Extensive Device Support: HPLIP supports a wide range of HP printers and scanners, ensuring compatibility for various models.
  4. Enhanced Functionality: The software provides advanced printing and scanning features, enabling users to maximize their device capabilities.
  5. User-Friendly Interface: HPLIP offers a simple and intuitive interface, making it easy for Linux users to navigate and utilize its features effectively.

Install HPLIP on Ubuntu 22.04 via DEFAULT APT

Step 1: Update Ubuntu Packages Before Installation Packages

It is important that you update your system packages before we start the HPLIP installation. This reduces the possibility of conflicts during the installation process and guarantees that all currently available packages are up-to-date. Use the following command to upgrade and update your packages on your terminal:

sudo apt update && sudo apt upgrade

Step 2: Install HPLIP on Ubuntu via APT Command

Install the HPLIP driver packages by default in your terminal. The majority of Ubuntu users, including those using short-term releases, should be able to utilize these packages:

sudo apt install hplip hplip-data hplip-gui hplip-doc

Install HPLIP on Ubuntu 22.04 via APT LaunchPAD PPA

💡
The upstream HPLIP PPA supports Ubuntu's long-term 22.04 releases. However, this PPA is incompatible with short-term Ubuntu versions, making it unusable on them.

Unless your hardware is not supported, please utilize the regular Ubuntu repository approach before using the PPA method.

The other way to install upstream drivers is to use a well-known LaunchPAD PPA that keeps up backports for the HPLIP; this might be a better option for those whose drivers don't function with the default method if they import the PPA and install them from here.

Step 1: Install Required Packages

Installing a few prerequisite packages is the next step in the installation procedure. The apt-transport-https package allows the usage of repositories accessed via the HTTPS protocol, while the software-properties-common package offers tools for managing software repositories and distribution. To install or verify if these packages are already installed, execute the following command:

sudo apt install software-properties-common apt-transport-https -y

Step 2: Import HPLIP PPA on Ubuntu

We'll utilize a well-known Launchpad PPA that Butterfly maintains to install HPLIP. Access to the most recent HPLIP package is guaranteed by this PPA, which is regularly updated.

Press this command to add this PPA to your system:

sudo add-apt-repository ppa:kelebek333/hplip -y

Step 3: Update APT Package Index

We need to add the new repository to the package index after importing the HPLIP PPA. Your system will be able to identify the HPLIP package from the additional PPA as a result. The package index can be updated by using the following command:

sudo apt update

Step 4: Install HPLIP on Ubuntu via APT Command

You can install HPLIP on Ubuntu once the PPA has been added and the package index has been updated. To install the HPLIP package on your Ubuntu system, execute the following command:

sudo apt install hplip hplip-gui

Configure and Test HPLIP Basic Setup on Ubuntu 22.04

It's crucial to configure and verify the basic configuration after HPLIP has successfully launched to make sure your HP devices are interacting with the software as intended. We'll guide you through setting up and testing your HP devices with HPLIP in this part.

Step 1: Run HPLIP Setup

Whether HPLIP is launched via the GUI or CLI, the setup procedure is the same. If you haven't already, launch HPLIP using the GUI technique outlined in the previous section or use the hp-setup command at the terminal.

hp-setup
HP Device Manager - Setup
HP Device Manager - Setup

Step 2: Select Connection Type

Selecting the connection type for your HP device will be required, when the HPLIP setup window shows up. USB, Network/Ethernet/Wireless, or Parallel are your options. After making your device's connection type selection, click Next.

Step 3: Discover and Select Your Device

Using the connection type you have chosen, HPLIP will now search for connected HP devices. You might need to manually enter your device's IP address or hostname (for Network/Ethernet/Wireless connections) if it is not identified automatically. After your device shows up in the list, pick it and press Next.

Step 4: Configure Printer Settings

You will set up the printer's basic settings in this stage, including the printer name and description. If preferred, you can also share the printer via your local network.

Click Next once the parameters have been adjusted.

Step 5: Install the Printer Driver

At this point, HPLIP will ask you to install the printer driver that is compatible with your device. The suggested driver will be picked automatically, but if necessary, you can alternatively select a different driver from the list. To start the driver installation procedure, click Next.

Testing HPLIP Installation on Ubuntu 22.04

It is crucial to test the installation after configuring your HP devices with HPLIP, whether you did it via the CLI or GUI. This will guarantee that your devices are operating as intended. We'll walk you through testing your HPLIP installation for printing and scanning in this part.

It is advised to print a test page to ensure your HP printer is operating properly. Either your operating system or the HPLIP setup procedure can be used to accomplish this.

CLI Method:

Put the following command into your terminal, changing printer_name to the name of your HP printer:

lp -d printer_name /usr/share/cups/data/testprint

GUI Method:

  1. Click the Printers application to start using Ubuntu.
  2. Find your HP printer and select it from the list of available printers.
  3. When you do a right-click on the printer, select Properties.
  4. Click the Print Test Page button in the printer properties window.

The test page should print properly if your HP printer is configured correctly and using HPLIP.

Test Scanning Functionality

HPLIP has an integrated scan utility that you may use to test the scanning capabilities of your HP all-in-one device.

CLI Method:

To start a test scan, type the following command into your terminal:

hp-scan --output=my-test-scan.png

A test scan will be generated by this command and saved in your current working directory as my-test-scan.png.

GUI Method:

  1. To open the HPLIP Toolbox, click the HPLIP Toolbox icon after searching for HPLIP in your program menu.
  2. Find your HP all-in-one device and choose it from the HPLIP Toolbox window.
  3. To launch the scanning tool, click the Scan button.
  4. To run a test scan, adhere to the on-screen directions and modify the scan parameters as necessary.

The scanning feature of your HP all-in-one device is correctly configured and functional with HPLIP if the test scan runs successfully.

Additional HPLIP Commands with Ubuntu 22.04

This section will go over several helpful instructions for Ubuntu users that are linked to HPLIP, like upgrading HPLIP, uninstalling HPLIP, and deleting the HPLIP PPA repository.

Update HPLIP

If you use the APT package manager on a desktop computer, HPLIP should update automatically along with your system packages. On the other hand, you can run the following command on your terminal to manually check for updates:

sudo apt update && sudo apt upgrade

With the help of this command, you can update your package index and install the most recent versions of all installed packages, including HPLIP.

Remove HPLIP

If HPLIP is no longer required on your system, you can use the following command to remove:

sudo apt remove hplip

With this command, the HPLIP program will be removed from your Ubuntu system.

Remove the HPLIP PPA Repository

Since HPLIP is no longer required, you might also want to remove the HPLIP PPA repository after deleting HPLIP. The repository removal command is the same as the repository addition command, but it now includes the --remove syntax. For the HPLIP PPA repository to be removed, type the following command into your terminal:

sudo add-apt-repository --remove ppa:kelebek333/hplip -y

FAQs to Install HPLIP on Ubuntu 22.04

Is HPLIP compatible with all HP printers? 

HPLIP supports a large number of HP printers. However, you can visit the official HPLIP website to check if your specific printer model is supported.

Can I manage scanning tasks using HPLIP? 

Yes, HPLIP allows you to manage scanning tasks alongside printing. Simply connect your HP scanner and use the provided scanning tools in the HPLIP software.

What additional software packages are required for HPLIP to work? 

HPLIP requires certain software dependencies to function properly. During installation, Ubuntu's package manager will automatically handle the installation of any required packages.

Does HPLIP support wireless printing? 

Yes, HPLIP supports both wired and wireless printing. Ensure your HP printer is connected to the same network as your Ubuntu machine for wireless functionality.

How can I check the status of my HP printer using HPLIP? 

HPLIP provides a command-line tool called hp-info that allows you to view valuable information about your HP printer, including its status and configuration.

Can I manage multiple HP printers with HPLIP? 

Yes, HPLIP enables you to manage multiple HP printers from a single interface. Simply connect each printer to your Ubuntu machine, and HPLIP will detect and list them for convenient management.

Do I need to restart my computer after installing HPLIP?

In most cases, a restart is not required after installing HPLIP. However, for changes to take effect, it's recommended to log out and log back in before using the HPLIP software.

Conclusion

We hope this tutorial helped you understand how to install HPLIP on Ubuntu 22.04.
If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.