FreeKB - CUPS Install and setup CUPS on Linux
CUPS - Install and setup CUPS on Linux

Use apt-get or yum to install CUPS (Common Unix Printing System).

~]# yum install cups


The CUPS configuration file is located at /etc/cups/cupsd.conf. By default, CUPS is configured to only listen for connections on the server itself. To be able to connect to the server from any PC in the subnet, make the following change to the cupsd.conf file (replace x.x.x.x with the IP address of the server).

Listen x.x.x.x:631
Listen /var/run/cups/cups.sock


The ps command can be used to determine if your system is using init or systemd. If PID 1 is init, then you will use the service command. If PID 1 is systemd, then you will use the systemctl command.

If your system is using systemd, use the systemctl command to restart cups.

systemctl restart cups


If your system is using init, use the service command to restart cups.

service cups restart


By default, the server does not have any allow or deny rules. Add Allow from (use your actual network address and prefix).

<Location />
  Order allow,deny
  Allow from

<Location /admin>
  Order allow,deny
  Allow from


Allow cups (port 631) in iptables or firewalld.

You can now access the CUPS web browser interface by navigating to (replace with the hostname or IP address of your CUPS print server). The CUPS web based utility has many options, such as add printers, find printer drivers, and view print jobs.


By default, CUPS will not have any printers listed. To add printers, in the web based utility, select the Administration tab > Add Printer, and follow the prompts. Once the printer has been added, use the lpstat -p command on the CUPS server to verify the printer is listed.

~]# lpstat -p
printer HP-Photosmart is idle. enabled since Mon 01 Jan 2016 00:00:01 AM CST


There should also be a PostScript Printer Definition (PPD) file in the /etc/cups/ppd directory. The .ppd file contains the printers configuration settings, such as paper size, duplexing, and fonts (just to name a few).

~]# ls /etc/cups/ppd


The /etc/cups/printers.conf file will include the list of printers connected to the CUPS server.

~]# cat /etc/cups/printers.conf
<DefaultPrinter HP-Photosmart>
UUID urn:uuid:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Info HP Photosmart
DeviceURI hp:/net/Photosmart_C6200_series?zc=HP58BE98
. . .



Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 84878 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |