In my office all computers are Windows and my computer runs Ubuntu 18.04.

We are connected by same network where IPv4 default gateway is, my IPv4 address is and the the Windows computer to which the printer is connected has IPv4 address (the printer is shared by the Windows 8 computer).

How do I connect/print with the printer with my Ubuntu?

My printer is HP Laserjet M1005 MFP.

You will need to install the driver foo2xqx.

According to the page you will need to perform following steps (open terminal and type in commands):

wget -O foo2zjs.tar.gz
tar zxf foo2zjs.tar.gz
cd foo2zjs

./getweb P1005     # Get HP LaserJet P1005 firmware file
./getweb P1006     # Get HP LaserJet P1006 firmware file
./getweb P1007     # Get HP LaserJet P1007 firmware file
./getweb P1008     # Get HP LaserJet P1008 firmware file
./getweb P1505     # Get HP LaserJet P1505 firmware file

sudo make install
sudo make install-hotplug
sudo make cups
sudo gnome-cups-manager

Adding the printer via command line using CUPS:

 lpadmin -p "NAME" -v "URI" -E -P /usr/share/cups/model/file.ppd.gz
 lpadmin -d "NAME"              # Set the default
  • 1
    This driver is already included in the default Ubuntu 18.04 installation. There is no need to install this driver. – user68186 Sep 14 at 14:20

Here is how to go about it in pictures

System Setup > Devices Printers

enter image description here

Do not click on the Green Add... button on top. Click on additional printer settings... circled above.

You should see a smaller window with +Add button on top left:

enter image description here

In the New Printer window select Windows Printer via SAMBA:

enter image description here

Then fill in the printer server detail. You may also click the browse button and search for printer servers.

Select HP as the printer manufacturer and then then scroll down to find your printer:

enter image description here

Click forward and complete the process.

Hope this helps

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.