LinuxCommandLibrary

cupsctl

Control the CUPS printing system

TLDR

Display the current configuration values

$ cupsctl
copy

Display the configuration values of a specific server
$ cupsctl -h [server[:port]]
copy

Enable encryption on the connection to the scheduler
$ cupsctl -E
copy

Enable or disable debug logging to the error_log file
$ cupsctl [--debug-logging|--no-debug-logging]
copy

Enable or disable remote administration
$ cupsctl [--remote-admin|--no-remote-admin]
copy

Parse the current debug logging state
$ cupsctl | grep '^_debug_logging' | awk -F= '{print $2}'
copy

SYNOPSIS

cupsctl [options]

PARAMETERS

--share-printers
    Enable printer sharing.

--no-share-printers
    Disable printer sharing.

--remote-admin
    Enable remote administration.

--no-remote-admin
    Disable remote administration.

--remote-any
    Allow remote access from any host.

--no-remote-any
    Disable remote access from any host.

--browse-dns
    Enable DNS browsing.

--no-browse-dns
    Disable DNS browsing.

--debug-level=N
    Set the debug level to N (0-2). 0=Errors, 1=Warnings, 2=Debug.

--user-agent=name
    Set the User-Agent header.

--[name]=[value]
    Set or clear named configuration options.

--
    Clear any remaining options. Useful when specifying options that begin with "-".

-h host[:port]
    Set the CUPS host and port to use.

-U username
    Set the username to use for authentication.

-v
    Show the CUPS server version.

-H
    Show usage information.

DESCRIPTION

The cupsctl command allows you to configure the Common UNIX Printing System (CUPS) server settings from the command line.
It primarily modifies the cupsd.conf configuration file. cupsctl is useful for enabling or disabling various features like browsing, remote administration, sharing printers, and debugging. The settings persist across CUPS server restarts.
It offers a more direct alternative to editing the configuration file manually, reducing the risk of syntax errors and enabling simpler automation of CUPS server setup.

SECURITY CONSIDERATIONS

Enabling remote administration or allowing access from any host (with --remote-any) can pose security risks.
Ensure proper authentication and authorization mechanisms are in place to protect your CUPS server.

CONFIGURATION FILE

cupsctl makes changes to the cupsd.conf configuration file.
It's located typically in /etc/cups/cupsd.conf. Always back up this file before making significant changes.

HISTORY

cupsctl was developed as part of the CUPS project to provide a command-line interface for managing the CUPS server configuration. It simplifies tasks like enabling printer sharing and remote administration, offering a user-friendly alternative to manually editing the cupsd.conf file. The command has evolved alongside CUPS, adding new features and options as needed to support the evolving printing landscape.

SEE ALSO

cupsd(8), lpadmin(8), lp(1)

Copied to clipboard