How to Set Up a Printer in Linux | Tips & Tricks
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.
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.
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 will immediately try to detect your printer. It’ll list the available printers. Select the one you want to add.
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.
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.
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.
The printer management application will start searching for the right drivers for your printer. It will take a bit of time, so be patient.
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.
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!
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.
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.
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.
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:
Note: if you don’t want to leave CUPS running all the time, you can stop the service with:
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.
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.”
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.
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.
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.”
You can now use the print dialog in any application to use the printer you set up.
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.
Once you’ve followed the instructions above, your printer should be working in Linux.
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.