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
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.
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
To enable the cups service
You need to check the status of the CUPS service to verify the service is running in an active mode.
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.
Here you need to do the following changes.
– Track the “Browsing No” line and change it to “Browsing On“.
– Trace the line where you find the “Listen localhost:631” line. Replace it with “Port 631” as we did here.
– 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.
– You would find another line “# Restrict access to the admin pages” and modify it as shown in the following image.
Once all the changes are performed, press “CTRL+S” and “CTRL+X” to save and exit the editor.
Step 3: Lastly, restart the cups service by issuing the following command.
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“.
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.
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.
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.
Here you go with the CUPS printer server!
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.