LinuxCommandLibrary

cupsd

Manage CUPS printing service

TLDR

Start cupsd in the background, aka. as a daemon

$ cupsd
copy

Start cupsd on the [f]oreground
$ cupsd -f
copy

[l]aunch cupsd on-demand (commonly used by launchd or systemd)
$ cupsd -l
copy

Start cupsd using the specified [c]upsd.conf configuration file
$ cupsd -c [path/to/cupsd.conf]
copy

Start cupsd using the specified cups-file[s].conf configuration file
$ cupsd -s [path/to/cups-files.conf]
copy

[t]est the [c]upsd.conf configuration file for errors
$ cupsd -t -c [path/to/cupsd.conf]
copy

[t]est the cups-file[s].conf configuration file for errors
$ cupsd -t -s [path/to/cups-files.conf]
copy

Display help
$ cupsd -h
copy

SYNOPSIS

cupsd [ -c config-file ] [ -f ] [ -h ] [ -l log-level ] [ -D ] [ -o option=value ] [ -R root-certificate ] [ -S server-certificate ] [ -v ]

PARAMETERS

-c config-file
    Specifies an alternate configuration file to use instead of the default cupsd.conf.

-f
    Runs the CUPS scheduler in the foreground. This is useful for debugging as it keeps the process attached to the terminal.

-h
    Shows a brief command usage help message.

-l log-level
    Sets the logging level for the daemon. Common levels include info, warn, error, and debug.

-D
    Enables debug logging. This often implies the debug log level and provides more verbose output.

-o option=value
    Sets a server option directly on the command line. This can override settings from cupsd.conf.

-R root-certificate
    Specifies the path to a root certificate file for SSL/TLS connections.

-S server-certificate
    Specifies the path to a server certificate file for SSL/TLS connections.

-v
    Displays the CUPS version information.

DESCRIPTION

cupsd is the central component of the Common Unix Printing System (CUPS). It acts as the print spooler and scheduler, managing print jobs, queues, and printers across a network or locally. Its primary function is to accept print requests from clients, process them, route them to the appropriate printer, and manage the printer's status. cupsd supports various printing protocols, including IPP (Internet Printing Protocol), LPD, and SMB, making it versatile for diverse environments.

It handles tasks like job scheduling, filter processing (to convert document formats to printer-readable formats), and provides printer sharing services. Typically, cupsd runs as a background service, started automatically at boot by the system's init system (e.g., systemd), and is rarely invoked directly by an end-user. It is fundamental for any Linux or Unix-like system that requires robust and flexible printing capabilities.

CAVEATS

cupsd is a system daemon and is typically managed by the system's init system (e.g., systemd). Users should generally not attempt to start or stop it directly from the command line unless for specific debugging purposes. Configuration changes are primarily made through the cupsd.conf file or the CUPS web interface, rather than command-line arguments to cupsd itself. Misconfiguration can lead to printing failures or security vulnerabilities. Troubleshooting often involves examining the log files located in /var/log/cups/.

CONFIGURATION FILES

cupsd heavily relies on configuration files for its operation. The primary configuration file is /etc/cups/cupsd.conf, which controls server-wide settings like listening addresses, logging, and security policies. Printer definitions are stored in /etc/cups/printers.conf, and printer capabilities are often described by PPD (PostScript Printer Description) files.

WEB INTERFACE

CUPS provides a convenient web-based administration interface, typically accessible via a web browser at http://localhost:631. This interface allows administrators and users to add/remove printers, manage print jobs, view printer status, and configure various server settings without direct command-line interaction with cupsd.

LOG FILES

cupsd generates several critical log files in the /var/log/cups/ directory. Key logs include error_log (for daemon errors and warnings), access_log (for client connection and print job requests), and page_log (for details on each printed page). These logs are essential for diagnosing issues and monitoring the printing system's activity.

HISTORY

CUPS was originally developed by Easy Software Products and first released in 1999. It was designed to replace older Unix printing systems like LPD and LPng, offering a more modular, robust, and Internet Printing Protocol (IPP) compliant solution. Apple Inc. acquired Easy Software Products in 2007, making CUPS an integral part of macOS. Development continued under Apple, solidifying its position as the de facto standard printing system across most Linux distributions and macOS. The cupsd daemon has remained the core of the CUPS architecture since its inception, continually evolving to support new printing technologies and protocols.

SEE ALSO

lp(1), lpr(1), lpstat(1), lpadmin(8), cupsctl(8), cupsd.conf(5), printers.conf(5)

Copied to clipboard