CUPS: How to use and configure printers the easy way

Among the recommended packages to be installed when performing a new installation, is cups y cups-pdf.

CUPS: "Common UNIX Printing System" or Common Printing System for UNIX, is a powerful software that is used to print from the different installed applications such as the browser that you are using now to read this post.

Normally, if we select the complete installation of the GNOME Desktop Environment, an application is installed by default to manage the printers through a graphical interface written in Python using in GTK +: system-config-printer for the GNOME and system-config-printer-kde for the KDE.

We do not recommend initially selecting that package because the installation of the CUPS is accompanied by a truly powerful web interface and on which this post will be about. We are not going to write an article at all to replace the help that comes with it, but to introduce you to the fascinating world of Linux printing via CUPS.

It's a real shame that the Online help is almost entirely in English. I think that in the CUPS official site a Spanish version can be found. To those who know enough English to translate it, WE HIGHLY RECOMMEND
read the online help and discover the power of this software, which can be used to print from a home work station, until installing a multi platform print server.

For those who only know Spanish, the few introductory paragraphs on each page will help them to start using this interface. CUPS requires many items like this.

We point our browser to the address of our localhost through port 631 and we are shown the home page of the CUPS.


Add Printer

Let's say we have a printer HP LaserJet 1100 connected to our team. I'm pretty sure it was already detected by the CUPS, but suppose it is not connected yet and they are going to lend us a similar one and we want to be prepared. Let's go to the page Administration and we click on the button

Add Printer. Initially CUPS looks for a printer connected. In case of not finding it, the following dialog page will be shown:


Suppose we have it connected to parallel port LPT # 1. After selecting it, we click Next and we are shown another dialog page in which
We will fill in the data that they ask us and we will determine if we want to share it or not:


When pressing Next, we are shown another dialog page through which we can select the manufacturer of our printer or provide a file PPD (Postscript Printer Definition).

The files * .ppd found on most printer installation discs. They are simple text files that describe the characteristics and capabilities of one or more printers. The online help in the documentation is very explicit about the use of these files and the compiler ppdc.


After we select the manufacturer HP and click on Next, we are shown another dialog page for us to select the specific model:


In that box we select HP LaserJet 1100 - CUPS + Gutenprint v5.2.6 (en) and after pressing Add printer, we are shown a page where we can configure it according to our needs:


and finally we press Change default options.

After CUPS confirms the changes, a few seconds later the status page of the newly added printer is displayed, or if we are in a hurry we press the HP-1100 link.


and if we select in the upper tabs the one titled Printers, we will see the following:


Notice how the printer also appears cups-pdf with the name PDF.

Share our printer.

We want to share the newly installed HP-110 not yet connected. In fact, we selected that we wanted to share it when we added it, but it is necessary to take one more step.

We have to go to the page Administration, and in the part of Server configuration select options Share printers connected to this system and if we want to print using a URL (recomendado) we also select the option Allow Internet Printing.


We only have to click on the button Change settings so that the changes on the server are permanent. This operation will restart CUPS and return to the login page. Administration.

To check the shared printer,

I tried with a peer-to-peer network configured as follows:

  • CUPS server: Desktop machine.
  • CUPS client: Laptop. IP

I opened a browser on the laptop with the address http: // localhost: 631, I went to the page Printers, and there was the HP-1100 printer shared with the URL

We can find out the URL by placing the cursor over the link HP-1100 of the page. For the record, the process of finding and installing the printer on the laptop was almost immediate.

Install it on a Windows XP client

If we want to install it on a Windows XP client for example, we will Home -> Printers and Faxes -> Add Printer -> Next. We select the option "A network printer or a printer connected to another computer" -> Next. We select "Connect to a printer on the Internet or in your home network or organization", and in the URL address we enter:

The dialog box “Choose the manufacturer and model of your printer. If you have…". We selected the manufacturer HP and the model HP LaserJet 1100 (MS) which is the closest.

After connecting our printer, we printed a test page and tested our entire installation in Windows.

Final Thoughts

Also if we go to the web interface of our server CUPS we will see on the page Jobs how our test page was printed or not. Just add that to cancel a print job you need the user name and password rootunless we have other users to manage print jobs.

Each printer manufacturer has its own book, and printing can become a very difficult task. One of the "classics" in this regard according to my own experience, is Hewlett Packard, which lately seems to stick to the maxim: "Why make things easy if we can make them very difficult."

CUPS does its best to hide both the difficulties inherent to the printer and those related to the application from which we want to print, so that we can concentrate more on the fact of Print itself, and not in the How to Print. As a general rule, the only time we need to get to know any aspect of our printer is when we use it for the first time. Even so and very often, CUPS imagine the "how-to" for yourself.

Magic? Not at all. This is the world of Debian
GNU / Linux.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

43 comments, leave yours

Leave a Comment

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



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   SuTabacoThank you said

    This post goes straight to FAVORITES.

    Thank you very much

  2.   artbgz said

    A question to all those who have configured CUPS, hasn't it happened that all the printers they configured in CUPS suddenly disappear? That happens to me every so often. What I notice that the printers.conf file is "flushed" and another one called "printers.conf.O" is created with all the configuration, what I do is delete the first file and rename the second to recover the configuration. But all this seems very strange to me.

    1.    Bray said

      cat printers.conf.O> printers.conf
      that's enough, it won't happen again.

      Cups is the most robust printing service on Linux.
      If you need help with any print issue + samba + linux + ti in general, send me an email, as soon as I can I will be answering you.
      dinformationt at gmail dot com

  3.   Chaparral said

    I congratulate the author for the work published here.
    I have never had a problem setting up and running my HP LaserJet 1018 USB printer, with the exception of the Manjaro Linux 0.8.4 distribution. I have tried all known methods, with no positive result, of course. In fact my system indicates that the printer is added, but no, it is not and in fact it does not print. It is possible that the driver foo2zjs-20130219-1 is missing, or I don't know, although I would not know how to install it on this system either.

  4.   Pavloco said

    Hopefully someone will give me a hand. In my work the printer is connected to a PC with Windows XP. How can I print from my laptop via the network? Thank you.

    1.    Mr Black said

      If the laptop has Gnu / Linux you would have to do it through SAMBA

      1.    Pavloco said

        Thanks for answering, I'll see if I find something.

  5.   Santiago said

    Excellent. Thank you very much!

  6.   federico said

    Thanks to ALL for your comments and successes !!!

  7.   Carlos said

    Added to favorites and shared 🙂 excellent post

  8.   Joaquin said

    Thank you!

  9.   commentator said

    Sometimes cups does not work with the default configuration, at least trying to install a hp 1020 laserjet printer on debian was impossible. In order to configure it "correctly" I had to look for other options.

  10.   Neo61 said

    I have been trying to print with an HP LJ 1000 in Ubuntu 12.04, I have seen how much help appears on the WEBs and I have not achieved anything, including what appears in this article and also configuring through HPLIPS, could you give me a hand? I am already desperate and I am the only one in the department that uses Linux wanting to show that with this system things are achieved unlike with Windows, imagine that this printer does not have support for Windows 7 and 8, so it is a problem of honor for Linux prove that it can. Any opinion?

  11.   Chaparral said

    I recently installed Debian Weezhy Xfce and after installing the required packages and downloading the necessary support during the installation, there was no way I could add the happy HP LaserJet 1018 printer, which, incidentally, is already an almost museum piece. in Google I found some commands and downloaded a small package that was barely 1500 kby. After this I managed to add the damn printer with localhost and there it is working. Too bad I didn't take note of the commands to follow, but from what I could read in my terrible English, some distributions no longer offer all the necessary support for adding the printer.

  12.   Paul said

    very good post, but…. So many steps to add a printer, I still use system-config-printer which is simpler and more direct, without having to write so much. It is time that linux simplified some tasks more without being so elaborate.

    1.    Paul said

      I forgot, they must not hide the difficulties so much, I think it complicates them a little more. We are in 2013 that debian and linux in general, put the batteries,

  13.   Erick said

    This post came about two years late for me, I found out the hard way, a couple of years ago, but good material, Greetings

  14.   Diego Rios said

    good night I have to connect two PCs on the linux network opensuse one server and gold client in the latter I need to install a printer and be able to have it in the cup`s from the server how can I do it where I can consult a totorial thanks

    1.    Bray said

      cups + samba or cups + ipp

  15.   Fabian Barrera placeholder image said

    Thank you so much. I don't understand why Debian cannot autodetect printers and this procedure has to be done. Thanks, again.

    1.    Bray said

      Yes it does, in fact if you install debian connected to a subnet in which there are shared resources, it connects them in the installation itself unless they require authentication but then it will promote you for it, in case of connecting (let's say with a machine already installed) any version of debia will allow you to see in the resource navigation, the "resources" connected to that network, without even the need to have the smb service installed, since avahi-deamon (daemon on any unix) takes care of This, giving you some type of error is different (there are errors that cannot be seen and you have to look for them), in that case if you belong to a domain install samba and that's it.
      Cups is the most robust printing service on Linux.
      If you need help with any print issue + samba + linux + ti in general, send me an email, as soon as I can I will be answering you.
      dinformationt at gmail dot com

  16.   Leps86 said

    Excellent POST, very useful, so much so that it has aroused curiosity in me. Today I bought an HP 2050 because it appears on the page ( ) Although it is 100% operational, I have the disadvantage that it does NOT scan (because I don't know hehehe).

    After reading this POST I am going to configure to be able to print via LAN from a computer with Guindows. Very thankful!

    1.    federico said

      Thanks for comment !!! I hope the post has served you -and it will help-. Cheers

    2.    Bray said

      I recommend you read a little about hplip, surely you will find how to solve the scanner issue.

  17.   Ediel said

    It hurts that it does not have the option to configure users and password for user permissions and administration.

    1.    federico said

      I recommend you read the help that accompanies the CUPS package itself. At the address:
      you will find the following:

      Server security

      In the default "standalone" configuration, there are few potential security risks - the CUPS server does not accept remote connections, and only accepts shared printer information from the local subnet. When you share printers and / or enable remote administration, you expose your system to potential unauthorized access. This help page provides an analysis of possible CUPS security concerns and describes how to better secure your server.
      Authentication Issues

      When you enable remote administration, the server will use Basic authentication for administration tasks. The current CUPS server supports Basic, Digest, Kerberos, and local certificate authentication:

      Basic authentication essentially places the clear text of the username and password on the network.

      Since CUPS uses the system username and password account information, the authentication information could be used to gain access to possibly privileged accounts on the server.

      Recommendation: Enable encryption to hide the username and password information - this is the default on MacOS X and systems with GNU TLS or OpenSSL installed.
      Digest authentication uses an MD5 checksum of the username, password, and domain ("CUPS"), so the original username and password is not sent over the network.

      The current implementation does not authenticate the entire message and uses the client's IP address for the nonce value, making it possible to launch "man in the middle" and replay attacks from the same client.

      Recommendation: Enable encryption to hide the username and password information.
      Local certificate authentication passes 128-bit «certificates» that identify an authenticated user. Certificates are created on-the-fly from random data and stored in files under / var / run / cups / certs. They have restricted read permissions: root + system-group (s) for the root certificate, and lp + lp for CGI certificates.

      Because certificates are only available on the local system, the CUPS server does not accept local authentication unless the client is connected to the loopback interface ( or :: 1) or domain socket.

      Recommendation: Ensure that unauthorized users are not added to the system group (s).

      Denial of Service Attacks

      When printer sharing or remote administration is enabled, the CUPS server, like all Internet services, is vulnerable to a variety of denial of service attacks:

      Establishing multiple connections to the server until the server will accept no more.

      This cannot be protected against by any known software. The MaxClientsPerHost directive can be used to configure CUPS to limit the number of connections allowed from a single host, however that does not prevent a distributed attack.

      Recommendation: Limit access to trusted systems and networks.
      Repeatedly opening and closing connections to the server as fast as possible.

      There is no easy way of protecting against this in the CUPS software. If the attack is coming from outside the local network, it may be possible to filter such an attack. However, once the connection request has been received by the server it must at least accept the connection to find out who is connecting.

      Recommendation: None.
      Flooding the network with broadcast packets on port 631.

      It might be possible to disable browsing if this condition is detected by the CUPS software, however if there are large numbers of printers available on the network such an algorithm might think that an attack was occurring when instead a valid update was being received.

      Recommendation: Block browse packets from foreign or untrusted networks using a router or firewall.
      Sending partial IPP requests; specifically, sending part of an attribute value and then stopping transmission.

      The current code will wait up to 1 second before timing out the partial value and closing the connection. This will slow the server responses to valid requests and may lead to dropped browsing packets, but will otherwise not affect the operation of the server.

      Recommendation: Block IPP packets from foreign or untrusted networks using a router or firewall.
      Sending large / long print jobs to printers, preventing other users from printing.

      There are limited facilities for protecting against large print jobs (the MaxRequestSize attribute), however this will not protect printers from malicious users and print files that generate hundreds or thousands of pages.

      Recommendation: Restrict printer access to known hosts or networks, and add user-level access controls as needed for expensive printers.

      Encryption Issues

      CUPS supports 128-bit SSL 3.0 and TLS 1.0 encryption of network connections via the OpenSSL, GNU TLS, and CDSA encryption libraries. In additional to the potential security issues posed by the SSL and TLS protocols, CUPS currently has the following additional issue:

      Certification validation / revocation; currently CUPS does not validate or revoke server or client certificates when establishing a secure connection. This can potentially lead to "man in the middle" and impersonation / spoofing attacks over unsecured networks. Future versions of CUPS will support both validation and revocation of server certificates.

      Recommendation: Do not depend on encryption for security when connecting to servers over the Internet or untrusted WAN links.

    2.    Bray said

      If you have.
      Cups is the most robust printing service on Linux.
      If you need help with any print issue + samba + linux + ti in general, send me an email, as soon as I can I will be answering you.

  18.   osmel said

    I am new to linux and installed chakra and although the printer detects me, it does not find its drivers, a brothermfc495cw and on the official website of the brand does not appear, searching the network I found this blog which details the installation from the printer, what happens to me is that I log in to the cups page and now when it asks me for the us and pss it won't let me enter. this on the side that has to do with the printer because on their page I enter without problems.

    any suggestion. thanks!!

  19.   userarch said

    I can't install, add a canon printer; from system-config-printer on gnome desktop; because I receive the message or dialogue:

    "FirewallD not running" error when trying to install a printer.

    I just found this solution in:
    in comment # 17 they indicate the apparent solution.

    But it confuses me, the fact of having to create the file:

    To replace the file:

    When seeing the content of the latter, I find that it has some commented instructions that refer to the file they want me to create, it seems to me that the solution is to uncomment the commented instructions. In fact that should be done, but since I don't understand what those instructions do, I would like someone to please give an explanation.

  20.   Pedro said

    I have read your article, I already installed and configured the printing service only that I am trying to configure a xerox m 123 printer and I can not find a driver for it, the ones that I have found on the internet do not work for me, it recommends something in specify please I am already desperate, from window directly connected to it print fine.
    From linux I configure it I search among the drivers for xerox but I cannot find one for m123, I choose one that I think is similar to it and when printing a test page it prints more than 50 sheets and wrong

  21.   Cristian said

    I have a Xerox Workcentre 3045NI, I do the steps described but not My model .. and it only gives me recommendations, but I choose a recommendation and then I test, it says that it sends the print and after a short time it already printed it, but nothing has happened or printed nothing. HELP….!

  22.   bit said

    A greeting on my website there is a tutorial how to install Epson multifunction XP-510 in case it helps someone or gives you ideas:

  23.   Dani said

    How do we get it to ask us for the ID when printing a page? Thanks a lot!

  24.   enrike said

    a question when I want to enter windows the he doesn't recognize me, what do I do? I get that it cannot be connected to the printed

  25.   catya said

    Hello, good tutorial, but I have a problem, I am working on virtual machines, the problem is basically that on the client I cannot see the print queue but on the server I can when I print from the client. Can you help me? Thanks 😉

  26.   Gonzalo claderas said

    Good morning, when I click the add printer button I get a message to enter a username and password ???

  27.   dofysoft said

    Hi, I have Linux Mint 13 installed on my desktop pc. My problem is that when I want to install from CUPs, the parallel port does not appear. My printer is an HP Deskjet 400. Salu2.

  28.   Wekmentor said

    Great, thanks for the tutorial, I just migrated to Linux and I have a lot of things to configure.

  29.   Reinaldo said

    I need to know, how can I configure the configuration file of cups 1.7.2, since I have a network in Ubuntu 14.04 and it turns out that when I install the printers, they are seen in all the computers on the network and that has made my job a mess since the clients don't see where they are going to print… I've done any number of things like modifying the cups and samba configuration but nothing. I have not been able to solve the problem, however I had Ubuntu 12.04 and I did not have that problem if I had to configure anything, I just unchecked the option to not see the printers connected to the network and that's it ... if you can help me please ....

  30.   Alexios said

    Hi. Regards. It is a great contribution. Install an HP p1102w and it works well, but it is happening to me that if I spend more than 5 min without using it, the printer turns off or perhaps goes into energy saving, which when sending a print, it does not receive it and does not come out, until it is turned on manually the printer, a task that is cumbersome because it is shared and if no one is near the host PC, everyone is left without printing. I tried everything, download the latest driver, 3.16.11, but I can't find where to disable or prevent the printer from going to sleep so that it is always alert.

  31.   Carlos said

    Hello, good morning, I have a problem, I installed two zebra printers in an ubuntu server, use "cups" to install the printers and then they appear on the network normally, but I need to print using ZPL, and I use the zebra setup utilities , and when I see it gives me an error, I use windows 10, I don't know if it's because the program is installed on the windows and I can't connect, I don't know. But to be clear, if they print well since I use a program in the company where out there it is printed in VPE and it makes it perfect, I would only need it via ZPL and I can't, in case you can help me please

  32.   fico said

    Carlos Santana: Incredible that a document written in March 2013 is still useful. I have not used Zebra printers yet. Nor do I know if the communication language used by the front end of the program installed through Zebra Setup uses is precisely the Zebra language. I THINK it is a question of the format of the document that the Zebra front end sends to CUPS, and that the latter does not endorse it.

  33.   Sergio Avila said

    Hello, good afternoon, I have a problem with printing from CentOS 6.9 via Cups. When trying to print, the text comes out in raw format on an HP Deskjet Professional 400. I have already looked through the ppd of the cups, looking for how to disable the raw output and take the properties defined by the Runtime Cobol control file .

    When sending the print page, the print comes out small, run. But when sending the print it goes well, without running but in raw format.

    Any suggestion?
    Thank you