How to Set Up a Printer in Linux

Configure Your Printer On Linux

Printing is something most people take for granted. It’s a basic function of PCs, but when you switch to a different platform, like Linux, things might get tricky. Linux doesn’t handle things quite like it does with other operating systems. Don’t expect to run a driver setup wizard off a CD or a download. Instead, on most distributions the drivers will probably already be installed or will be handled automatically.

Official Drivers

That said, some printer manufacturers do provide official Linux drivers. Both HP and Brother are actually known for supporting Linux well and do release their own printer drivers. Before you start this process, visit your printer manufacturer’s website to see if they support Linux.

This is an especially good idea if your printer is a newer model. While the Linux community is usually excellent at supporting devices, they are also mostly doing this work on a volunteer basis. That means drivers for the absolute newest devices might take some time to arrive. Printer manufacturers also may have their own install process, a .deb or .rpm package, or  might just provide a PPD file that you can upload during this process to manually provide the optimal drivers for your printer.

Generally, printing on Linux isn’t specific to a distribution. Instead, it’s your desktop environment that dictates which configuration tool you’ll use to set up your printer.

GNOME

GNOME Print Settings

Open the GNOME Settings. This, like a lot of things, has been integrated into GNOME’s base functionality. Once you’re there, look for “Devices” on the left-side menu, then click the “Printers” tab on the next menu.

In the middle of the window click the button to add a printer.

GNOME Printer List

GNOME will immediately try to detect your printer. It’ll list the available printers. Select the one you want to add.

GNOME Printers

It will begin searching for available drivers. When it’s done, GNOME will automatically add your printer. You’ll be returned to the Settings menu where you started, and your printer will be listed.

XFCE/Generic GTK

XFCE Add Printer

Open your Print Settings under the “System” tab of your application launcher. Like most native XFCE components, you’ll notice that the window is relatively simple and straightforward. Click on the large button to the top-right to unlock the window to make changes. You’ll need to enter your password or the password for root.

XFCE Available Printers

Click the “Add” button. It has a plus sign icon by default. A new larger window will open, displaying a listing of available printers to the left and more detailed information about the selected printer to the right. Find your printer, and press “Forward” at the bottom-right.

XFCE Searching For Printer Drivers

The printer management application will start searching for the right drivers for your printer. It will take a bit of time, so be patient.

XFCE Recommended Printer Drivers

When it’s done searching, you’ll see a new window with a huge list of printer manufacturers with one listed as “Recommended.” Press “Forward” again, and you should see your printer model listed to the left and the recommended drivers to the right. If the model listed is similar to your printer, it’s probably right. If not, you can always try the generic drivers. Press “Forward” again when everything looks correct.

XFCE Printer Description

The next screen asks you to give your printer a name and provide a brief description. After you do, press the “Apply” button to finalize your printer. The system will set everything up, and ask you if you want to print a test page. That’s entirely your choice. Your printer is ready to use!

KDE

KDE Printer Settings

Open Kickoff and head to the “Settings” tab. Find and click “System Settings.” Scroll down to find the “Printers” tab. When you first arrive, it will ask you to sign in with an administrative account. If you have access to sudo, you’ll be fine. Otherwise, you’ll need to use root.

KDE Available Printers

Once you’re signed in, click the button at the center of the window to launch the process to add a printer. A new window will open up, listing the available printers. Select the one you want to set up.

KDE Available Drivers

Plasma will try to find your drivers. When it’s done searching, it will show you a list of printer manufacturers with your recommended drivers at the top. If it doesn’t find anything, it’ll recommend generic drivers. You can always look through the list and manually select your drivers, though.

KDE Printer added

Next, you can set a description for your printer. When you’re done, click the “Finish” button. Your printer will be listed back on the settings screen where you started out.

The manual method using CUPS

If after trying the above method your system still cannot detect your printer, then the last resort is to configure it manually using CUPS.

The Common Unix Printer Service (CUPS), which was in fact developed by Apple, is the printer server that allows one to print in Linux. It can be used with a single, local computer or with a networked group of computers. CUPS offers a web-based configuration management tool for printers.

If your distribution doesn’t have CUPS installed, use the appropriate command for your package manager to install it. For instance, if you are running Ubuntu, the command would be:

Start the service with:

or

Note: if you don’t want to leave CUPS running all the time, you can stop the service with:

or

If you are a power user, you may wish to modify the configuration file “/etc/cups/cupsd.conf.” That file will let you change certain printer settings, such as whether to enable shared printers and which type of authentication to use. If you make changes to this file while CUPS is already running, don’t forget to restart the server:

For more information about what you can do with the CUPS configuration file, visit the man page:

The Web-Based CUPS Interface

Once you have CUPS running, you can visit the web-based interface by opening a browser and navigating to localhost:631. This address indicates that the server is running locally on port 631.

printing-CUPS

To get started, plug in your printer and go to the “Administration” tab. In the “Printers” section at the top-left of the page, click “Add Printer.”

printing-add-printer

The server will ask you for a username and password. You can log in as root, but if you want regular users to be able to use the printer too, you must add them to the lpadmin group. The command to add a user to a group varies by distro. On Ubuntu, it is:

If you’re lucky, your printer will be detected and shown in the list of discovered local and network printers.

printing-printers-list

Select the printer and “Continue.” For this example, we are using a USB printer, but – as you can see in the screenshot above – this can also work for a wireless printer. The CUPS interface will give you a few options for configuring the printer. Check off the box beside “Share This Printer” if you wish to allow other users on your network to access it.

printing-printer-config

Next, CUPS will attempt to autodetect your printer’s model. If it gets it wrong, you can select the correct model from the list of models that appears. If your particular model is not on the list, you can provide a PostScript Printer Definition (PPD) file. Some manufacturers may make the PPD available online for download.

Note: some printers share the same PPD file with another model of the same family and brand. If you can’t find the PPD for your printer, check with the printer’s manufacturer for the details. You can also find a number of printer drivers at OpenPrinting.org

If you’re using a Hewlett-Packard (HP) printer, the easiest way to get CUPS to recognize it is to install Hewlett-Packard’s Linux Imaging and Printing Software (HPLIP). This collection of drivers may be included in one of your package repositories as “hplip.” Once you’ve installed it, refresh the “Add Printer” page in your browser. If all went according to plan, your HP printer should now show up in the list of supported models.

After you’ve successfully added your printer, CUPS will present you with some more configuration options. If you have a standard home printer, you’ll probably wish to change the default media size to “Letter.”

printing-printer-config2

You can now use the print dialog in any application to use the printer you set up.

printing-print

When you are printing, you can go back to the CUPS administration page and click on the “Jobs” tab to view a list of running and queued print jobs.

printing-jobs

Once you’ve followed the instructions above, your printer should be working in Linux.

Conclusion

Most of the time, setting up a printer in Linux is not as difficult as you think. It often gets detected when you plug it into your system. Generally, the process is relatively painless and actually fairly streamlined.

7 comments

  1. HP has better support than Brother, but Brothers support is not bad. I had an HP printer and switched to Brother because my HP printer was always having problems and the ink was excessively expensive. Brother has a self extracting driver package that is not all that hard to install. Yes, you have to use the command line, but if I can do it anyone can. I am a GUI guy and almost never use the command line. I am also happy to report the last few OS’s I installed supported my printer natively.

    I like my Brother printer better than my HP one though the support isn’t as good. Way less problems and much cheaper ink cartridges.

  2. Jim, I agree I have a Brother and thinks it’s the best printer/value out there.

  3. I like HP laser printers, and HP has the best Linux support. That said, HPLIP or Cups should be used as a last resort only if your printer cannot be detected and installed in system settings/printers.

  4. @Nonya – Hi, I usually skip to using CUPS initially. Why do you say CUPS should be used as a last resort?

  5. My laptop keeps thinking the printing is complete but the printer never actually prints anything.

  6. Linux is the most popular Operating system because of the security of the Linux is best to compare then the other. You can simply install the HP Printer in Linux by properly install the printer driver.

  7. I just bought a new i7 core computer with Linx mint 19. I also bought a new Brother “Linux printer” on Amazon. The Web page for the printer clearly advertises that it is a Linux, windows and mac printer. So I bought it and when I got it the driver CD was only for Windows and Mac. I got the printer installed and it printed, but it would not duplex print.
    Brother could not provide a driver to enable duplex printing, so I am supposedly getting a full refund since the ad was clearly innacurate.
    The same problem is widespread in the computer industry with no products supplying a Linux driver CD. After attempting to install, the products do not function properly. Of course if you install with the provided windows or mac CD driver the product works perfectly.
    It used to be at one time that businesses Ioved Linux and everything worked beautifully with Linux because they are more versatile and safer and affordable. Most computer geeks, including Gates and Jobs, once loved Linux because it could be tweaked any way you want. Now everyone is a sheep on the way to slaughter with windows and mac.
    Baaaaaaaah, baaaaaaaaaah.
    .

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.

Sponsored Stories