How to Set Up Your Wireless and USB Printer in Linux

Bertel King 11-04-2016

Under ideal circumstances, printing on Linux will just work. This is true whether you’re using a USB cable or connecting over a network. Linux detects my HP Envy 4500 automatically and prints over the network without my having to hunt for drivers or type in an IP address.


Depending on what printer you own, your experience may not go so smoothly. Fortunately, Linux comes with a built-in back up plan for when your computer and printer don’t communicate automatically. Only when that fails do you have to hunt around for drivers the old-fashioned way, and at that point, you may be in a situation where your hardware doesn’t yet run under Linux.


The likelihood of this is increasingly small. Printers aren’t the most rapidly evolving form of tech, and Linux comes with support for many common models.

Technical Background

Most common Linux distributions use the Common Unix Printing System (CUPS, for short) to communicate with printers and get the pixels on your screen onto paper. These days Apple runs the project, so you may recognize the experience if you’ve moved over from Mac OS X. CUPS communicates with local and network printers using the Internet Printing Protocol.
You can typically find a way to manage printers under system settings, but there’s also the option of using the web-based interface by typing localhost:631 into your browser.

How Things Should Work

Ideally, printer installation should be automatic and happen in the background. You plug your printer in, you go to print a document, and you see the printer listed as one of the options.


To confirm if a printer was added automatically, go to Settings > Printers. You should see your printer’s name appear on the left.

Installing a Driver

When your computer doesn’t automatically detect your printer, you will have to go looking for a driver. Specifically, you’re looking for a PostScript Printer Description (PPD) file. This is a description of your printer’s capabilities and is needed to make yours run.

Fortunately, having to go hunting for one doesn’t necessarily mean you’re in for a hard time.

Using the Foomatic database

Chances are, your Linux distribution shipped with a database of free software printer drivers known as Footmatic. It’s a funny name, the history of which you can read about online.


To search Foomatic for a driver in Ubuntu, for example, go to System Settings > Printers. From there, press the + or Add button. Select your serial port and press Forward. You should then see a screen prompting you to select your printer make and model.


If you don’t see your exact model, it may be worth selecting the closest one to see if you get lucky.

Installing a Manufacturer-Supplied PPD

When the Foomatic database doesn’t have what you need, your next option is to check your printer manufacturer’s website. There you may find the PPD file for CUPS.



Manufacturers may provide other instructions or installation tools to aid you in the process. Brother provides drivers and commands to make its printers work under Linux. HP supplies Linux Imaging and Printing (HPLIP) software.

When that method doesn’t work, you can also give the database a shot.

Adding a Network Printer

As with using a USB cable, if you’ve already configured your printer to connect to your local network The 3 Easiest Ways to Share a Printer Over a Network You can share your one printer with multiple PCs across a local network. We explain how to set this up in Windows. We also show you alternative ways to share your printer. Read More , then it should pop up when you search for available printers.
If it doesn’t, then it’s time to get your hands dirty. The CUPS web interface looks the same regardless of which Linux desktop environment you prefer (it also works in Raspbian How to Make Your Own Wireless Printer With a Raspberry Pi Want to turn an old printer into a wireless printer for your network? Here's how to make any printer wireless with a Raspberry Pi. Read More ), so let’s head there.


In the CUPS web interface, click Adding Printers and Classes or the Administration tab at the top.
Then click Add Printer. CUPS will prompt you for root access.

The next page will list the printers you’ve already configured for your computer, other available machines on your network, and options for adding a printer that CUPS could not detect. If you know the IP address of your printer, the most straightforward approach is to go with Internet Printing Protocol. Then enter


…changing ip_address and printer_name to the correct values.


Most network-enabled printers let you set the IP address using the built-in control panel, but maybe you don’t have that option, or you want to assign address remotely. Either way, you can do so using the DHCP protocol. It sounds complex, but you only need to add the line below to the end of the /etc/dhcpd.conf file, providing your own names or numbers for hostname, mac_address, and ip_address.

host hostname {
hardware ethernet mac_address;
fixed-address ip_address;

Make sure the hostname you used is also listed in the /etc/hosts file or registered with your DNS server.

CUPS supports other methods, in case you don’t want to go with DCHP.

This process only works if your printer is already connected to your network. If you have an older unit connected via a cable, you can turn it into a wireless machine using a Raspberry Pi How to Make Your Own Wireless Printer With a Raspberry Pi Want to turn an old printer into a wireless printer for your network? Here's how to make any printer wireless with a Raspberry Pi. Read More .

A Foolproof Backup Plan

Printers don’t have the best reputation. They break, they run out of ink all the time, and as the explanation above indicates, setup isn’t always easy. But these days there are ways to avoid configuring a printer to work with each of your devices.

HP ePrint-compatible printers provide you with an email address and print out any documents or pictures sent to that address. This works regardless of if you’re using a desktop or mobile phone. Yes, you are dependent on HP keeping the service running, you have to trust that they aren’t doing anything with your email, and print jobs can take a while to go through. These things aside, it works regardless of if you’re using Linux, Windows, FreeBSD, Android, iOS, Ubuntu Touch, or an old version of Maemo still trucking along on a Nokia N900 you couldn’t bear to get rid of.

You can get a similar experience if you already have a machine configured to run with Apple AirPrint, Google Cloud Print, and other similar services.

When all else fails, you can always get someone else to print your document for you 5 Ways to Print Documents When You Are Out of the House Outside the house and need to get something printed on time? Find the nearest places to print your documents with these tips. Read More . And if there’s no time for that, you can at least print to PDF and save the document for later How to Print to PDF from Any Platform Need to print a file to PDF? It's easier than you might think, no matter what device you're using. We have summarized all your options. Read More .

Printing Complete!

Printers can be a pain. But, perhaps surprisingly, this is one area where your experience might be easier on Linux than you’ve grown accustomed to elsewhere. Many printers are plug in play. You connect your computer and voila, it prints and scans, no finger crossing required. That the process has come so far is one sign that now might be a great time to migrate your workflow over to Linux Everything You Need to Migrate Your Home Office to Linux It's for this reason why many users are looking to make the switch to Linux. If you're one of them, you're going to want to read on. We're going to talk about how to move... Read More .

Sadly, there remains a dark side to using printers on Linux. Have you been there? Have you ever had to manually edit files to get things to work? Have you had a printer that simply wasn’t supported at all? Or have your printers always worked great out of the box? Share your stories of success or frustration with us!

Related topics: Printing, USB, Wi-Fi.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. Miguel Pettis
    September 7, 2019 at 7:24 am

    I found your suggestions very reassuring and incredibly common-sense-useful! Loved this post and I’m definitely pinning it to share! Thanks for the great read and awesome tips!

  2. install hp printer without cd
    May 17, 2019 at 7:13 am

    Thanks for sharing, Wired printers are commonly associated with a PC which goes about as a focal center point for the printer or install hp printer without cd. The association is made with the assistance of links which are associated by means of the USB port pursued by introducing the HP printer setup.

  3. rajkaushik
    August 29, 2018 at 2:35 am

    It's an informative article for Linux user. However mostly people use windows 10 computer. But its a good one to know about Linux OS too.

  4. Grady
    August 14, 2018 at 9:51 pm

    Great article, but I am not even close. Printing with Linux is always difficult or worse?

    • Joe Merchant
      February 25, 2019 at 5:00 pm

      I'm currently fighting with a Samsung M2020W - in USB wired mode it was easy under Ubuntu 18.04. I also shared it to a Windows VM (Ubuntu host) via network and that went smooth and easy.

      The unpleasant part at the moment is setting up WiFi direct connection - the Samsung/HP utilities to configure the network port are Windows/MAC only.

  5. Anonymous
    May 5, 2016 at 12:42 pm

    I've been using an Epson SX218 'all-in-one', related to the business-class WorkForce series, for several years. When I started in Linux, with Ubuntu, I found the driver on Epson's download site (as a .deb file), installed it, then installed the printer. Easy-peasy.

    These days, in 'Puppy' Linux, the home network uses the p910nd 'socket' protocol, set up via the CUPS web interface. The server runs a daemon which listens on port 9100: the clients have the printer installed as though it were the local printer via USB. This eliminates the problem we've probably all had at some point, where the versions of CUPS at either end of the standard 'sharing' link often have different ideas about what takes priority.....and it prevents print jobs getting lost in a queue somewhere in cyberspace!

    TBH, I'd rather set up via CUPS, anyway; it gives you far more fine-grained control over what you're doing, rather than just going with defaults.

  6. Kevin
    April 18, 2016 at 12:56 pm

    I was "gifted" w/a used HP L7580 all-n-one printer several years ago. I used Win 7 and currently a Win8.1 PC with it. As you stated above, the ink is always running out, so I do not even bother. I heavily used the scanner, though. That meant waiting for the printer to turn on, and display the low ink error, press the "OK" button a few times, then was ready to scan. Until one day, the HP driver refused to work without the printer being serviced. I uninstalled / reinstalled the most current HP driver, to no avail.

    I've been using Ubuntu Studio on one of my older PCs, and needed to scan a contract. So, I plugged it in to the Linux machine's usb port, and within minutes, was ready to scan. The most work was using the software-search tool to find a suitable scanning software, which was easy. Found them and I was on my way to happy-scan-land.


  7. actingman
    April 12, 2016 at 2:31 pm

    My experience so far says the opposite is true. It is easier to find a driver in the database for an older printer. I plugged in my new printer with the latest version of the Linux distro I use, it promptly said what printer I had, and then it said it did not have a driver for it. So I had to hunt and peck and search around and try different drivers until I found one that worked.

    And this is exactly how I would expect it to behave, no matter what OS I was using. You cannot expect any closed or open source OS to have every last new, recent device in their database the second you need it. Until the manufacturers send out Linux drivers on an enclosed disc that will install with the click of a button, it will always be a question if you are going to get the printer to work in Linux.

    • Bertel King
      April 12, 2016 at 6:32 pm

      Very true. I've never enjoyed sticking a compact disc into my computer to start using a printer, but doing this does guarantee the thing will work.

  8. Grcoeeg
    April 12, 2016 at 2:47 am

    I use Zorin OS, Pinguy OS, Chromixium/Cub Linux OS and a Chromebook, all have been easy to hook up to my cheap little Epson NX 330 ink jet printer. Like the post says just click on the printer icon in what is usually called the ( system settings ) and follow the prompts. The guys designing these Linux/Ubuntu OS's are making things very easy, now.

    • Bertel King
      April 12, 2016 at 1:07 pm

      The most difficult part about writing this post was trying to recall/figure out what to do if something goes wrong, because every printer I use is automatically detected these days. It's great.