How to set up HP printer and scaner on CentOS 7?

Setting up HP printers and scanners on RHEL-based systems

HP printers and scanners on Rocky Linux, CentOS, or RHEL require the HPLIP (HP Linux Imaging and Printing) package. This guide covers the complete setup process.

Install HPLIP packages

Start by installing the core HPLIP packages:

sudo dnf install hplip hplip-gui hpijs

On older CentOS 7 systems, use yum instead of dnf. HPLIP may prompt you to install additional dependencies — allow these installations to proceed. Some printer models require proprietary plugins that won’t function without the complete package set.

Install printer plugins

HP printers often need proprietary plugins for full functionality. Install them with:

sudo hp-plugin

This tool downloads and installs device-specific plugins. You may need to accept licensing agreements. If the command fails, ensure you have internet connectivity and that your printer model is supported by the current HPLIP version.

Configure your printer

Run the printer setup utility:

sudo hp-setup

This interactive tool will:

  • Detect connected printers (USB or network)
  • Configure the printer for your system
  • Set default print queues
  • Test basic connectivity

Follow the on-screen prompts. For network printers, enter the IP address when prompted.

Verify scanner functionality

Test scanner detection:

scanimage -L

This lists all detected scanners. If your scanner appears, the configuration is complete.

For USB scanners, ensure your user account belongs to the lpadmin and lp groups to avoid permission issues:

sudo usermod -aG lpadmin,lp $USER

Log out and back in for group changes to take effect.

Troubleshooting

Printer not detected: Check USB connections or network connectivity. For network printers, verify the device is on the same subnet:

sudo hp-probe -bnet

Plugin installation fails: Update HPLIP to the latest version. Older HPLIP versions may not support newer printer models:

sudo dnf update hplip

Scanner permissions denied: Ensure you’ve added your user to the appropriate groups (see above).

Check HPLIP status: View detailed device and driver information:

hp-info

Accessing the GUI

If you installed hplip-gui, launch the control panel:

sudo hp-toolbox

This provides a graphical interface for printer management, status monitoring, and basic diagnostics.

Similar Posts

5 Comments

  1. I have tried for hours to install a HP Deskjet Ink Advantage 2676 Printer wireless to no avail
    When running hp_setup the printer is not seen. I run Windows (dual-boot) on the same box and the printer is fine from Windows. Any help would be appreciated.

  2. The final command gave me this output:

    [root@localhost ~]# hp-setup

    HP Linux Imaging and Printing System (ver. 3.18.4)
    Printer/Fax Setup Utility ver. 9.0

    Copyright (c) 2001-15 HP Development Company, LP
    This software comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to distribute it
    under certain conditions. See COPYING file for more details.

    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    No protocol specified
    qt.qpa.xcb: could not connect to display :0
    qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
    This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

    Aborted (core dumped)

    —-

    Was not sure what to do from here.

  3. I could not use hp-setup to complete the printer setup for a wireless HP LaserJet Professional Printer 1102W. It failed at the last step.
    What worked for me is:
    yum install hplip hplip-gui hpijs
    hp-plugin
    I then used GOOGLE CHROME to configure the printer. There are a few selections to be made along the way which I do not recall but if someone see this and wants the GOOGLE CHROME setup steps, I can recreate and provide the information.

Leave a Reply

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