Ubuntu

Set up CUPS printer server on Ubuntu 22.04

A printer server acts as a bridge between the end-users and the printers. A printer server software is installed on the network server and the printing facility can be available on the whole network.

CUPS (Common UNIX Printing System) is a widely used printing system for Linux-based operating systems. The Linux system equipped with CUPS acts as a printing server and multiple clients can put their requests to that server.

Keeping in view the importance of CUPS, this post provides the following learning outcomes.

– How to install CUPS on Ubuntu 22.04

– How to set up CUPS on Ubuntu 22.04

– How to use CUPS on Ubuntu 22.04

How to install CUPS on Ubuntu 22.04

CUPS printer server is available on the official Ubuntu repository. By default, the Ubuntu 22.04 is equipped with the latest version of CUPS. Moreover, if you run the install command as we did here. You would come to know that the CUPS is already installed and is the latest version.

$ sudo apt install cups

Text Description automatically generated

The output shows that the CUPS is already installed on Ubuntu 22.04.

How to set up CUPS on Ubuntu 22.04

As CUPS is available on Ubuntu 22.04. You are now set to configure the CUPS to start using it. This section enlists the recommended steps to configure the CUPS on Ubuntu 22.04.

Step 1: Firstly, you need to start and enable the CUPS service. This would help you to keep using the CUPS service after reboot. To do so, make use of the following commands to start and enable the CUPS service.

To start the cups service

$ sudo systemctl start cups

To enable the cups service

$ sudo systemctl enable cups

Text Description automatically generated

You need to check the status of the CUPS service to verify the service is running in an active mode.

$ sudo systemctl status cups

Text Description automatically generated

The output shows that the service is enabled and running actively.

Step 2: Now, edit the configuration file of CUPS to make some changes. The following command will help you to access the cups configuration file.

$ sudo nano /etc/cups/cupsd.conf

Here you need to do the following changes.

– Track the “Browsing No” line and change it to “Browsing On“.

Text Description automatically generated

– Trace the line where you find the “Listen localhost:631” line. Replace it with “Port 631” as we did here.

Text Description automatically generated

– Look for the line named “# Restrict access to the server” and add the line “Allow @LOCAL” to ensure the cups must listen to all interfaces.

Text Description automatically generated

– You would find another line “# Restrict access to the admin pages” and modify it as shown in the following image.

Text Description automatically generated

Once all the changes are performed, press “CTRL+S” and “CTRL+X” to save and exit the editor.

Text Description automatically generated

Step 3: Lastly, restart the cups service by issuing the following command.

$ sudo systemctl restart cups

Once all the three steps are executed properly, you can now use the CUPS printer server on Ubuntu 22.04.

How to use CUPS printer server on Ubuntu 22.04

The functionality of the CUPS printer server depends on its configuration. If the configuration file is updated accordingly, then you can use it as follows.

Step 1: Firstly, the CUPS printer server is not added to your printers list. To add it, open the “Settings“.

Scroll down the left pane and choose “Printers” and you will find a green button “Add a Printer“.

Graphical user interface, text, application Description automatically generated

Once you click on the “Add a Printer” button, you will get the CUPS printer in the list as shown below. Select it and click on “Add” to add CUPS to the printers list.

Graphical user interface, text, application Description automatically generated

After doing so, it is observed that the CUPS will be added to your printer list and is ready to serve you as can be seen from the following image.

Graphical user interface, text, application, email Description automatically generated

Step 2: Once the printer is added to the list, you can print any file using the CUPS printer server. Head over to the file you want to get printed. Open it and press “CTRL+P“.

You would get the list of printers. Choose the relevant CUPS printer and hit “Print” to get the print of the file.

Graphical user interface, text, email, website Description automatically generated

Here you go with the CUPS printer server!

Conclusion

CUPS is a well-known printer server for Linux-based operating systems. CUPS acts as a server and multiple requests can be made to CUPS for printing. Ubuntu 22.04 is equipped with the latest version of the CUPS printer server. This post acts as a masterpiece of CUPS for Ubuntu 22.04. You would have learned to install, configure and use the CUPS printer server on Ubuntu 22.04.

About the author

Adnan Shabbir