How to Set Up a Printer with CUPS on Arch Linux
Categories:
5 minute read
Arch Linux is a flexible and lightweight Linux distribution that gives users complete control over their system. While this level of control is empowering, it also means you need to configure some things manually—including printer support. Fortunately, setting up a printer on Arch Linux using CUPS (Common Unix Printing System) is straightforward once you understand the steps involved.
This guide will cover how to set up a printer on Arch Linux using CUPS, including installing the necessary packages, configuring the service, accessing the web interface, and troubleshooting common issues.
What is CUPS?
CUPS is an open-source printing system developed by Apple that acts as a print server for Unix-like operating systems. It uses the Internet Printing Protocol (IPP) and supports a wide range of printer drivers and backends. CUPS enables local and network printing and can be accessed through a web interface, command-line tools, or desktop environments.
Prerequisites
Before setting up a printer with CUPS on Arch Linux, make sure you have:
- A working Arch Linux installation
- Root or sudo privileges
- An internet connection
- Your printer connected (via USB or network)
Step 1: Install CUPS and Required Packages
Open a terminal and update your package list:
sudo pacman -Syu
Now install the core CUPS package and additional recommended utilities:
sudo pacman -S cups cups-pdf ghostscript gsfonts gutenprint foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-db-ppds foomatic-filters hplip
Package Descriptions
cups
: The core printing systemcups-pdf
: Adds support for printing to PDF filesghostscript
: Required for interpreting PostScript and PDFgsfonts
: Basic font set used by Ghostscriptgutenprint
: High-quality drivers for many printersfoomatic-*
: Database and tools for using PPD (PostScript Printer Description) fileshplip
: HP printer drivers and tools (only needed for HP printers)
Step 2: Enable and Start the CUPS Service
After installing CUPS, you need to enable and start its systemd service:
sudo systemctl enable --now cups.service
To verify the service is running:
systemctl status cups.service
You should see output indicating that the service is “active (running)”.
Step 3: Add Your User to the lp
and sys
Groups
To manage printers and access administrative functions, your user account should belong to the appropriate groups:
sudo usermod -aG lp,sys $USER
After this, log out and log back in to apply the group changes.
Step 4: Access the CUPS Web Interface
CUPS provides a web interface to manage printers. Open a browser and go to:
http://localhost:631
If the page loads, you’ve successfully started the CUPS server.
If it doesn’t work
Make sure cups.service
is active and that your firewall allows connections to port 631 on localhost.
Step 5: Add a Printer
Now that you’re in the web interface:
- Click on the Administration tab.
- Click Add Printer.
- Enter your username and password when prompted.
- CUPS will scan for connected printers—both local and networked. Select your printer from the list.
- Choose the appropriate driver (PPD file). CUPS will often detect this automatically. If not, you may need to select a driver manually from the list or provide a PPD file from your printer manufacturer.
- Set the printer name, description, and location.
- Choose whether to share the printer over the network.
- Click Add Printer.
Once added, you can print a test page to confirm everything is working.
Step 6: Configure Printer Options
Once your printer is installed, you can configure its settings:
- Go to the Printers tab on the CUPS interface.
- Click on your printer name.
- Use the buttons and dropdowns to change the default settings such as paper size, print quality, or duplex printing.
- You can also pause or resume the printer and cancel print jobs from this screen.
Step 7: Printing from Applications
Most desktop applications on Arch Linux will automatically detect and use the printer added through CUPS. If you’re using a desktop environment like GNOME, KDE, or XFCE, the printer should show up in their respective print dialogs.
For example:
- In LibreOffice: File → Print → Select your printer
- In Firefox: File → Print → Choose your printer
You can also print from the command line using the lp
or lpr
commands:
lp filename.pdf
Optional: Using HP Printers with hp-setup
If you’re using an HP printer, the hplip
package includes hp-setup
, a utility for automatically configuring HP devices.
To run it:
sudo hp-setup
This will guide you through setting up the printer, including downloading proprietary drivers if needed.
If you’re using a USB printer:
sudo hp-setup -i
Use the -i
flag for interactive mode in the terminal.
Step 8: Troubleshooting
Printer Not Detected
- Make sure the printer is powered on and properly connected.
- For USB printers, check with
lsusb
if the system sees the device. - For network printers, verify they are accessible via ping or their IP address.
No Driver Found
Try installing additional driver packages such as:
sudo pacman -S system-config-printer
Visit the manufacturer’s website for a PPD file and upload it during printer setup.
Web Interface Not Loading
- Ensure CUPS is running:
systemctl status cups
- Check for firewall rules blocking port 631.
Permission Issues
- Verify that your user is in the
lp
andsys
groups. - Restart your session or reboot after making changes.
Bonus: Sharing Printers Over the Network
If you want to share your printer with other systems:
- Go to the Administration tab in the CUPS web interface.
- Enable:
- “Share printers connected to this system”
- “Allow remote administration” (optional)
- Edit
/etc/cups/cupsd.conf
to allow access:
Find and update these lines:
Listen localhost:631
Change to:
Port 631
And under <Location />
and <Location /admin>
blocks, allow access from your subnet:
Order allow,deny
Allow 192.168.1.*
Then restart CUPS:
sudo systemctl restart cups.service
On client machines, just open CUPS, and the shared printer should be automatically detected.
Conclusion
Setting up a printer on Arch Linux using CUPS may seem intimidating at first, but it becomes quite manageable once broken down into clear steps. With the flexibility Arch offers and the powerful features of CUPS, you can configure almost any printer—from local USB devices to advanced network printers.
By following the steps in this guide, you should now have a working printer setup, accessible via the web interface and usable from all your favorite applications. Whether you’re printing documents, PDFs, or photos, CUPS on Arch Linux offers a reliable and customizable printing solution.
If you need help with specific printer models or encounter uncommon issues, the Arch Wiki’s CUPS page is an excellent resource with up-to-date community support and troubleshooting tips.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.