cups-config - Linux


Overview

cups-config is a command-line utility for configuring the Common Unix Printing System (CUPS) on Linux systems. It allows administrators and users to modify CUPS settings, manage printers, and perform various printing-related tasks.

Syntax

cups-config [options] command [arguments]

Options/Flags

  • -h, –help: Print help message and exit.
  • -V, –version: Print version information and exit.
  • -w, –web: Launch the CUPS web interface.
  • -c, –config: Specify an alternate CUPS configuration file.
  • -d, –driver: Specify a particular PPD file or driver.
  • -e, –error-handling: Control how errors are handled.
  • -l, –log: Specify a log file for recording errors and messages.
  • -s, –server: Specify the address or port of the CUPS server.

Examples

Add a printer

cups-config lpadmin -p "My Printer" -E
cups-config lpadmin -p "My Printer" -E -v lpd://cups.example.com/printers/lp0

Set default printer

cups-config lpadmin -d "My Printer"

Create a PDF file from a PostScript file

cups-config pstopdf -o pdf_file.pdf ps_file.ps

View CUPS status

cups-config ppdstatus
cups-config scheduler-status

Common Issues

  • Permission denied: Ensure you have sufficient permissions to execute the cups-config command.
  • No printers found: Verify that the printer is connected and properly configured.
  • Failed to create PDF: Check that cups-config has access to a PDF converter.

Integration

  • lp: Send print jobs to a printer.
  • lpadmin: Manage printers and print queues.
  • lpoptions: Configure printer options.
  • lpstat: Monitor print jobs and printer status.

Related Commands

  • system-config-printer: A graphical user interface for managing printers.
  • cups: The CUPS daemon that manages the printing system.
  • CUPS User Guide: Comprehensive documentation on CUPS.