CUPS Commands - Manage Printers & Print Jobs | Online Free DevTools by Hexmos

Master CUPS commands for printer management and print job control. Learn to print files, view queues, remove jobs, and manage printer status with our comprehensive guide.

CUPS Commands

CUPS (Common UNIX Printing System) is a modular printing system that allows a computer to act as a print server. It supports printing from Unix-like operating systems. Below are common CUPS commands to manage printers and print jobs.

Manage Printers and Print Jobs

These commands are essential for interacting with your print server and managing the flow of documents to your printers.

Accessing the CUPS Web Interface

You can manage printers, print jobs, and server settings through a web browser.

# To manage printers through CUPS:
http://localhost:631 (in web browser)

Printing Files

Use the lp command to send files to the default printer or a specified printer.

# To print a file to the default printer:
lp <file>

Displaying the Print Queue

Check the status of jobs in the print queue.

# To display the print queue:
lpq

Removing Print Jobs

Cancel specific print jobs from the queue.

# Remove a print job from the queue by its job ID:
lprm 545

# Remove the current print job:
lprm -

CUPS Log Location

Find the log files for CUPS to troubleshoot printing issues.

# To print log location:
/var/log/cups

Rejecting and Accepting New Jobs

Temporarily stop or resume accepting print jobs for a specific printer.

# To reject new jobs for a printer:
cupsreject <printer-name>

# To accept new jobs for a printer:
cupsaccept <printer-name>

Further Resources