10 useful IPSTAT commands for cups (printing server)

CUPS (Common Unix Printing System) is a printing server for Linux and other Unix-like operating systems. It allows users to print to local and network printers, and provides a variety of features such as print job management, access control, and support for various printer languages and protocols.

  • Configure the CUPS server by editing the configuration files in the /etc/cups directory. You can use the web interface provided by CUPS to configure the server, by accessing it through your browser (http://localhost:631)
  • Add printers to the CUPS server by using the web interface or command line tools such as lpadmin.
  • Configure the client computers to use the CUPS server as their print server.
  • You can also use the CUPS web interface to manage print jobs, configure printer settings, and monitor the print server’s status.

How to install CUPS in Redhat/centos/ubuntu?

By using Below command, we can install CUPS.

yum install cups
apt-get install cups

How to start CUPS service?

By using below command, we can CUPS service in linux

systemctl start cups

How to configure the cups service to be started automatically at boot time?

By using below command we can enable cups service, so that it will start automatically at boot time

systemctl enable cups.service

How to check the status of cups service?

By using below command we can check the status of cups service

systemctl status cups.service

How to enable a printer in cups printer service?

By using below command we can enable a printer

cupsenable <printername>

How to disable printer in cups printer service?

By using below command we can disable a printer

cupsdisable <printername>

How to see printing jobs of other users?

By using below command we can see printing jobs of other users, we can also mention username after -u flag, by default it will all users printing jobs if nothing is mentioned after -u flag

lpstat -W completed -u
lpstat -W completed -u <username>

How to show default printer name and status of all printer?

By using below command we can see default printer and we can see status of all printers

-t Shows all status information. This is equivalent to using the “-r”, “-d”, “-c”, “-v”, “-a”, “-p”, and “-o” options

lpstat -t

How to view list of all completed jobs?

we can see list of all completed jobs using below command

lpstat -W completed -o

How to see more information of each printing jobs?

we can see little bit more information of printing jobs by using below command

lpstat -l -W all -o

How to kill all print jobs?

By using below command we can kill all printing jobs

lprm -

How to list of not completed jobs?

By using below command, we can list the printing jobs which are not completed.

lpstat -o

Note: This is a general process for setting up a CUPS printing server on Linux, the specific commands and steps may vary depending on your Linux distribution.

Also, CUPS support many protocols like IPP, LPD, SMB, USB, and more, it also support many printer languages like PCL, PostScript, PDF, and others.

It also provides a good integration with other services like Samba, LDAP, and Kerberos.

CUPS also have a good security features like authentication, encryption, and access control.

Leave a Reply

Your email address will not be published. Required fields are marked *