Linux Printer Configuration - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux Printer Configuration Guide
Complete beginner-friendly guide to setting up and configuring printers on Linux, covering Arch Linux, CachyOS, and other distributions including CUPS, USB printers, network printers, and troubleshooting.
Table of Contents
- Understanding Linux Printing
- CUPS Installation
- USB Printer Setup
- Network Printer Setup
- Printer Configuration
- Troubleshooting
Understanding Linux Printing
Printing System
CUPS (Common Unix Printing System) is the printing system on Linux.
What it does:
- Manages printers: Handles printer communication
- Print queues: Manages print jobs
- Driver support: Provides printer drivers
- Network printing: Supports network printers
Printer Types
Supported printers:
- USB printers: Direct USB connection
- Network printers: Ethernet/Wi-Fi printers
- IPP printers: Internet Printing Protocol
- Samba printers: Windows network printers
CUPS Installation
Install CUPS
Arch/CachyOS:
# Install CUPS
sudo pacman -S cups cups-pdf ghostscript gsfonts
# For Gutenprint drivers
sudo pacman -S gutenprint
Debian/Ubuntu:
sudo apt install cups cups-pdf
Fedora:
sudo dnf install cups cups-pdf
Enable CUPS
Start CUPS:
# Enable service
sudo systemctl enable --now cups.service
# Check status
systemctl status cups
CUPS Web Interface
Access CUPS:
- Open browser
- Navigate to: http://localhost:631
- Login (if prompted)
What you can do:
- Add printers
- Manage print jobs
- Configure printers
- View printer status
Add User to Group
Add to lp group:
# Add user to lp group
sudo usermod -aG lp username
# Log out and back in
USB Printer Setup
Connect Printer
Steps:
- Connect USB printer
- Check if detected:
# List USB devices lsusb # Check CUPS lpinfo -v
Add Printer
Via CUPS web interface:
- Open: http://localhost:631
- Administration > Add Printer
- Select USB printer
- Choose driver
- Set name and options
Via command line:
# Add printer
lpadmin -p PrinterName -E -v usb://printer/uri -m driver
# Set as default
lpoptions -d PrinterName
Network Printer Setup
Add Network Printer
Via CUPS web interface:
- Open: http://localhost:631
- Administration > Add Printer
- Select network printer
- Enter printer IP or hostname
- Choose driver
Via command line:
# Add network printer
lpadmin -p NetworkPrinter -E -v ipp://printer-ip/ipp/print -m driver
Samba Printer
Add Windows printer:
# Install Samba
sudo pacman -S samba
# Add printer
lpadmin -p SambaPrinter -E -v smb://server/printer -m driver
Printer Configuration
Test Print
Print test page:
# Print test page
lp -d PrinterName /usr/share/cups/data/testprint
# Or from CUPS web interface
# Administration > Print Test Page
Printer Options
Set options:
# Set default options
lpoptions -p PrinterName -o media=A4 -o sides=two-sided-long-edge
Troubleshooting
Printer Not Detected
Check connection:
# Check USB
lsusb | grep -i printer
# Check CUPS
lpinfo -v
# Check CUPS logs
sudo journalctl -u cups
Print Job Stuck
Clear queue:
# List jobs
lpq
# Cancel job
cancel job-id
# Cancel all
cancel -a
Driver Issues
Install drivers:
# Install Gutenprint
sudo pacman -S gutenprint
# Or HP drivers
sudo pacman -S hplip
Summary
This guide covered printer configuration for Arch Linux, CachyOS, and other distributions, including CUPS setup, USB/network printers, and troubleshooting.
Next Steps
- Hardware Detection - Hardware setup
- Network Configuration - Network setup
- ArchWiki CUPS: https://wiki.archlinux.org/title/CUPS
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.