How To Configure Printers On Linux With Cups
Getting a Printer to work on Linux is more difficult than it is on other operating systems. The reason for this is that not all printers have driver support for Linux. Additionally, each desktop environment handles printers differently, so there’s no universal set of instructions for users to follow. Luckily, there’s an easy way to configure printers on Linux; the Cups printing system. It’s an open source tool that Apple develops. With it, adding printers to Linux is a piece of cake!
SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.
Install Cups
Pretty much all printing on Linux happens with Cups. You may already have this software installed on your Linux PC. However, this isn’t true 100% of the time, so it’s safe to go through the installation process anyway. Open up a terminal and follow the commands to get it working depending on your Linux distribution.
Ubuntu
sudo apt install cups
Debian
sudo apt-get install cups
Arch Linux
sudo pacman -S cups
Fedora
sudo dnf install cups -y
OpenSUSE
sudo zypper install cups
Generic Linux
Need to use Cups but can’t install it on your Linux OS the easy way? Don’t worry! The source code for the software is on Github. To install it, read through this page. Learn what dependencies you’ll need for it to build correctly. Then, when all of the dependencies are taken care of, open up a terminal and use the Git tool to clone the latest release.
git clone https://github.com/apple/cups.git
Using the CD command, move the terminal into the cups sources folder.
cd cups
Run the configure command. Using configure generates all the necessary items for Cups to build. It will also check for dependencies, and see if the building environment is set up correctly. DO NOT SKIP THIS STEP!
./configure
Let the configure scripts run and set up the development environment. If the scripts don’t run into any errors, it’s safe to start the compilation. In the terminal, run the make command.
make
Cups takes a long time to compile, especially on Linux PC’s that don’t have a lot of performance power. When the compilation is done, use the test command to check the software and determine that it works.
make test
Finally, after running the test, install Cups to the system with:
sudo make install
Add Printers
The Cups printing system on Linux is pretty automatic — if you have a printer that has native Linux support. However, if the Linux operating system you’re using doesn’t have a built-in driver for Linux, Cups isn’t going to see it, and nothing will work.
Generally, a good workaround for printing on Linux is to find out if your printer supports working over a network. That way, if the manufacturer refuses to support the Linux platform, it won’t matter and you’ll be able to use it with Cups anyways.
To add a printer, open up a web browser and load up the Cups web interface.
localhost:631/
In the Cups web interface, click on the “Administration” tab at the top of the page. Alternatively, look for “Cups for Administrators,” and select the “Adding Printers and Classes” button to go to the printer management area.
Local Printers
Need to add a local printer? Start out by turning it on, and plug it into your Linux PC. Ensure that Linux detects it as a device, by entering the following command into a terminal:
lsusb
If the printer shows up as a device in lsusb, your OS should support it. Return to the Cups printer admin area and click the “find new printers” button. Selecting this option is best as it allows Cups to scan your system for any printers (locally, and on the network).
Let Cups scan for devices. When the scan is complete, it will print out a list of available printers. Next, to each printer it finds, you’ll see an “Add This Printer” button. Click it, and add your printer to the Cups system.
Network Printers
Cups is quite good at detecting compatible printers, even network ones. If you know the exact network IP address of your network printer, click the “Add Printer” button, scroll down to “Other Network Printers,” and specify the address. Otherwise, select the “Find New Printers” button and allow the software to detect it automatically.
After letting Cups detect printers, click the “Add This Printer” button next to your printer in the interface.
Printing A Test Page
Now that your printer is working with Cups, it’s time to print out a test page, to confirm that you can print. Open up your application menu, type “printers” and open it.
Gnome/GTK Instructions
Use Gnome or a desktop environment that makes use of the Gnome printer app? Follow these instructions to print a test page.
Step 1: open up the printer app by searching for “printers” in activities, or the settings area.
Step 2: look for the printer you added in Cups and select it in the menu.
Step 3: find the “print test page” button and select it to start printing a test page.
KDE Instructions
Are you a KDE Plasma user? If so, follow these instructions to learn how to print out a test page.
Step 1: open up the Plasma app menu and search for “Printers”.
Step 2: in the Printers app, select the printer you added to Cups.
Step 3: click the “maintenance” button and select “print test page”.