Getting your Raspberry Pi connected to a printer

This article will guide you through the process of installing CUPS (Common Unix Printing System) on Raspberry Pi to connect it with a network printer and print documents from your RPi.


Updated October 18, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


This article will guide you through the process of installing CUPS (Common Unix Printing System) on Raspberry Pi to connect it with a network printer and print documents from your RPi.

Introduction

CUPS is an open-source printing system used in many Linux distributions, including Raspbian. It allows you to manage printing tasks from multiple clients and supports various printing protocols like IPP, HTTP, and AppSocket/JetDirect. In this article, we will see how to install CUPS on Raspberry Pi and set up a network printer for seamless printing.

Prerequisites

Before getting started, make sure you have the following:

  • Raspberry Pi with Raspbian installed (preferably updated)
  • Network connection on your Raspberry Pi
  • A network printer that supports IPP or another supported protocol by CUPS
  • An internet browser to check the printer’s status and print jobs

Step 1: Update your system

Before installing any new packages, it is a good practice to update your system. Open a terminal window (or SSH into your Raspberry Pi) and run the following command:

sudo apt-get update && sudo apt-get upgrade

This will download the latest package lists and install any available updates for your current software.

Step 2: Install CUPS

Now, we need to install CUPS on our Raspberry Pi. Run the following command in the terminal:

sudo apt-get install cups

Once the installation is complete, the CUPS service will start automatically. You can check its status by running:

sudo systemctl status cups

If the service is active and running, you are good to go! If not, try restarting it using:

sudo systemctl restart cups

Step 3: Configure CUPS

CUPS provides a web-based interface for managing printers and print jobs. To access it, open your internet browser on your computer and type the following URL:

http://<RPi_IP_address>:631/

Replace <RPi_IP_address> with the IP address of your Raspberry Pi. You should see the CUPS web interface, where you can add, delete, or modify printers.

To configure a network printer, click on “Add Printer” and follow the wizard. Enter your printer’s make and model, connection type (either IPP or other supported protocol), and the printer’s IP address or URL. CUPS will then attempt to automatically detect the printer and its capabilities. If it doesn’t work, you can manually specify these details in the “Administration” tab.

Step 4: Test your printer

After adding your printer, go back to the main page of the CUPS web interface and find your printer in the list. Click on it and then click on “Print Test Page.” This will send a test page to your printer. If everything is set up correctly, you should see the test page printed.

Conclusion

In this article, we have learned how to install CUPS on Raspberry Pi and configure a network printer for seamless printing. With CUPS installed, you can manage all your print jobs from any device on your network through its web interface or command line tools like lp and lpr.

Remember that the official documentation of CUPS provides more information and troubleshooting tips if you run into any issues: https://www.cups.org/documentation.html