Installing HP Printer Drivers on Linux Mint and Ubuntu
HP printers work reasonably well on Linux, though the setup process varies depending on whether you have a network printer or a USB-connected device. Here’s what you need to know.
Install HPLIP
HPLIP (HP Linux Imaging and Printing) is the main driver package for HP printers. Install it along with the GUI configuration tool:
sudo apt update
sudo apt install hplip hplip-gui
Note: aptitude still works but apt is the standard in modern Mint and Ubuntu. Aptitude also isn’t installed by default anymore.
Configure Your Printer
Using the GUI
For most users, the graphical setup is easiest:
sudo hp-setup
This launches a wizard that detects connected printers and walks you through configuration. The tool will auto-detect USB printers immediately and network printers on your local subnet.
Using the Command Line
If you prefer the terminal or need to script printer setup:
sudo hp-setup -i
This runs the setup in interactive mode without the GUI. You can also auto-detect and install without interaction:
sudo hp-setup -a
Verify the Installation
Check if your printer was detected and added to CUPS (the printing system):
lpstat -p -d
This shows all configured printers and which one is default. Test printing:
echo "Test print" | lp -d PrinterName
Replace PrinterName with your actual printer’s name from lpstat output.
Network Printer Setup
For network printers, ensure your printer is on the same subnet and has a stable IP address (set a static IP in your printer’s web interface if possible). The HP setup tool will find it automatically, but you can also add it manually through the CUPS web interface:
sudo cupsctl --remote-admin --share-printers
Then navigate to http://localhost:631 in your browser and add the printer via the “Administration” tab.
Troubleshooting
Printer not detected:
- Check that USB cable is securely connected (for USB printers) or that the device is on the network
- Run
sudo hp-probe -buslistto manually detect connected devices - Try unplugging and replugging the USB cable
Plugin installation needed:
Some newer HP printers require proprietary plugins. The setup wizard will prompt you to download these if needed. If it fails, try:
sudo hp-plugin -i
Permission denied errors:
Ensure your user is in the lp and lpadmin groups:
sudo usermod -aG lp,lpadmin $USER
You’ll need to log out and back in for group changes to take effect.
Printer queue stuck:
Clear the print queue if jobs won’t process:
sudo cancel -a
sudo systemctl restart cups
Check Printer Status
View real-time printer information and test cartridge levels (on supported models):
hp-info -d PrinterName
Or use the diagnostic tool:
hp-doctor
This runs a comprehensive health check on your HPLIP installation and connected devices.
Remove or Switch Printers
To delete a printer from CUPS:
sudo lpadmin -x PrinterName
To view all configured printers and remove via GUI:
sudo system-config-printer
Most HP printers—including multifunction devices—work reliably on Linux once HPLIP is properly installed. If you encounter driver issues on a specific model, check the HPLIP Supported Printers database to confirm your model is supported and note any quirks for that device.

Thank you
Thank you very much. Like magic, your instruction connects my Linux 19.1 Tessa installed on Macbook to the HP Laserjet P1102w printer. I had wasted a night trying to set this up.
Many, many thanks Eric! HP found the USB port that my printer was connected to using this method. Sourceforge’s HP installation couldn’t find the USB connection even though localhost found it earlier, and had successfully printed a test page.
Laserjet 1320 not found or recognized. Location unknown. It keeps saying it may be due to a firewall setting. “This may be due to existing firewall settings blocking the required ports. When you are in a trusted network environment, you may open the ports for network services like mdns and slp in the firewall. For detailed steps follow the link. http://hplipopensource.com/node/375”
That link is not found. I think I’m supposed to find a location from the printer, or on the ISP online 168 address, but I haven’t found it.
It prints fine as a USB printer, but can’t set it up as a network printer on my D-Link2750b router.
sudo lpinfo -v
This command resulted in all blank results, just a list of network socket
network lpd
network ipp14
network beh
network ipp
network https
network http
network ipps
direct hp
network smb
This is a problem of locating the network usb address. Many solutions advise connecting USB printer to USB router port, and then running CUPS, HPLIP or Linux install. This is known as installing a network printer. No one says they have successfully done this let alone shown how they did it. It cannot be done.
Printers seems to have installed, but I’m really not sure if it’s an actual install of the usb-router connection, or a mis-read of the printer previously installed as direct PC to usb install. Printing a test page yields “cups-waiting-for-job-completed” and it never prints.
thank you so much. this worked for me. 2 lines of code and thats it done.