Skip to content

How to Install CUPS Print Server on Ubuntu Linux

Richard
Written by
Richard
Oct 16, 2021 Updated Mar 18, 2026 4 min read
Enable Automatic Suspension in Ubuntu Linux Easily

You install a CUPS print server on Ubuntu Linux to manage printing across multiple devices, acting as the central hub for your printer network.

CUPS, or Common UNIX Printing System, is a print spooler and server software that standardizes printing on Unix-like operating systems, including Ubuntu. It allows you to share printers and control print jobs from a single location.

By setting up CUPS, you gain robust features like IPP network printing, automatic discovery of printers on your network, and a convenient web-based interface for administration. This setup is ideal for environments managing several printers, offering a flexible and efficient printing solution.

⚡ Quick Answer

Install CUPS by opening a terminal and running ‘sudo apt update’ followed by ‘sudo apt install cups’. Then, manage CUPS using its web interface at http://localhost:631/admin or by editing the ‘/etc/cups/cupsd.conf’ file.

How to install CUPS on Ubuntu Linux

As mentioned above, CUPS can turn any Unix-like operating system, including Ubuntu, into a print server. CUPS packages are in Ubuntu repositories by default, and the installation is pretty straightforward.

To install CUPS on Ubuntu, run the commands below.

🐧Bash / Shell
sudo apt update
sudo apt install cups

Once CUPS is installed, the commands below can be used to stop and enable CUPS service to start when the server boots automatically.

🐧Bash / Shell
sudo systemctl stop cups
sudo systemctl start cups
sudo systemctl enable cups

To verify that CUPS is installed and running, run the commands below.

🐧Bash / Shell
sudo systemctl status cups

You should then see similar output as below:

💻Code
cups.service - CUPS Scheduler
     Loaded: loaded (/lib/systemd/system/cups.service; enabled; vendor preset: >
     Active: active (running) since Sat 2021-10-16 14:15:03 CDT; 2min 36s ago
TriggeredBy: ● cups.socket
             ● cups.path
       Docs: man:cupsd(8)
   Main PID: 664 (cupsd)
      Tasks: 1 (limit: 4651)
     Memory: 2.3M
     CGroup: /system.slice/cups.service
             └─664 /usr/sbin/cupsd -l

Oct 16 14:15:03 ubuntu2004 systemd[1]: Started CUPS Scheduler.

How to configure CUPS on Ubuntu Linux

After installing CUPS above, you can configure CUPS its web interface at http://localhost:631/admin.

ubuntu cups web interface

If you prefer the command line interface, the CUPS configuration file is located at /etc/cups/cupsd.conf.

Run the commands below to create a backup copy of the configuration file when using the command line to configure CUPS.

🐧Bash / Shell
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.original

Then run the commands below to open the CUPS configuration file.

🐧Bash / Shell
sudo nano /etc/cups/cupsd.conf

You can then begin configuring settings that suit your environment.

By default, CUPS listens on port 631.

💻Code
# Only listen for connections from the local machine.
Listen localhost:631
Listen /run/cups/cups.sock

You can also ensure browsing is enabled to allow CUPS to make shared printers available on the network.

Set the directive below to dnsd protocol (that supports Bonjour); by default, it is enabled.

💻Code
# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols dnssd

CUPS also restricts access to the printer server web interface and admin pages using the directives below. You can add Allow @LOCAL to allow computers from the local network to access the CUPS web interface.

💻Code
#Restrict access to the server
<Location />
 Order allow,deny
Allow @LOCAL
<Location>

#Restrict access to the admin pages.
<Location /admin>
Order allow,deny
Allow @LOCAL
<Location>

If you prefer to configure using the CUPS web interface, root or a user authenticated in the lpadmin group is recommended.

To add a user to lpadmin group, type:

🐧Bash / Shell
sudo usermod -aG lpadmin username

Replace the username with the account you want to add to the lpadmin group.

When you’re done, run the commands below to restart CUPS.

🐧Bash / Shell
sudo systemctl restart cups

How to install printer drivers on Ubuntu Linux

Most HP printers support Linux systems, including Ubuntu. However, installing HP’s Linux Imaging and Printing software (HPLIP) won’t hurt.

Run the commands below to install hplip on Ubuntu.

🐧Bash / Shell
sudo apt install hplip

For CUPS to publish a shared printer, you may need to install avahi-daemon. avahi-daemon is a Bonjour server that will broadcast your computer’s information on the network.

🐧Bash / Shell
sudo apt install avahi-daemon
sudo systemctl start avahi-daemon

If you have a firewall enabled, you must also allow CUPS traffic through the firewall. You can run the commands below to enable CUPS through the Ubuntu firewall.

🐧Bash / Shell
sudo ufw allow 631/tcp
sudo ufw allow 5353/udp

How to add a printer on Ubuntu Linux

Now that CUPS is installed and configured log on to your Ubuntu machine, browse the CUPS print server, and access any shared printers.

Below we showed you how to install printers on Ubuntu Linux. Reference the post below to learn how to add a printer to Ubuntu.

How to add printers to Ubuntu Linux

Installing a printer via CUPS on Ubuntu Linux
ubuntu install printer via cups

That should do it!

Conclusion:

  • Setting up a CUPS print server on Ubuntu Linux allows for efficient management of print jobs in environments with multiple printers.
  • The installation process is straightforward, with CUPS readily available in the Ubuntu repositories.
  • CUPS provides both graphical and command-line interfaces for configuration, catering to different user preferences.
  • Installing printer drivers and allowing necessary firewall traffic ensures optimal printer functionality and accessibility.
  • Following these steps helps students and new users gain valuable experience in managing print services on Linux systems.
  • Overall, CUPS is a powerful and cost-effective solution for individuals and businesses seeking to enhance their printing capabilities.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

No comments yet — be the first to share your thoughts!

Leave a Comment

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

Exit mobile version