Using cups printer linux

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

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.

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

To enable the cups service

Text Description automatically generated

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

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.

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.

Читайте также:  Cannot find device linux

Text Description automatically generated

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“.

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.

Источник

Linux cups tutorial for beginners

CUPS is a printing system used on many different Linux distributions. Its use is very widespread, as it has become the standard print manager on the majority of popular Linux distros. It acts as a print spooler, scheduler, print job manager, and can store information for numerous local or network printers.

In this guide, we’ll introduce you to CUPS on Linux, with basic information like commands, accessing its web interface, default port, how to add a printer, testing, and starting and stopping the service. Various systems may implement CUPS differently or put their own spin on it, but CUPS works mostly the same on any distro and these instructions will likely apply to any system that utilizes CUPS.

In this tutorial you will learn:

  • How to use the CUPS web interface
  • How to add a printer in CUPS
  • Various CUPS commands
  • How to control the CUPS service

An introduction to CUPS on Linux

Software Requirements and Linux Command Line Conventions

Category Requirements, Conventions or Software Version Used
System Any Linux distro with CUPS
Software CUPS
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user
Читайте также:  Линукс узнать версию операционной системы

CUPS web interface

Most users will wish to interact with CUPS through its provided web interface. The web interface runs on port 631, thus it can be accessed through any browser by navigating to http://localhost:631 .

CUPS web interface on Linux

In the web control panel, you can add or delete printers, install drivers, access the print spooler, and configure various settings for all the printers accessible from your PC. Most or all of the options you’ll need to interact with can be found in the “Administration” section.

Administration section inside the CUPS web control panel

Add a printer in CUPS

You can add a printer through CUPS by going to the “Administration” section as described above, then clicking “Add printer.” If there are any network printers discovered, they’ll be listed here. Otherwise, you can choose to add an “HP printer” which is more of a catch-all for any type of hardwired printer, and not specifically HP manufactured printers.

Adding a printer to our Linux system through CUPS

If you’re sure there is a printer on the network that hasn’t been automatically discovered and listed here, just choose the appropriate network protocol and click through to the next menu to add it via its network address.

CUPS commands

CUPS can be used from the Linux command line to print files, see available printers, and even configure lots of different printing options. The following is not an exhaustive list of commands, but they’re enough to get an idea for how CUPS works on the command line.

To print a file, use the lp command followed by the file you wish to print. CUPS can interpret most types of files, including text, PDF, images, etc.

CUPS will attempt to send this print job to your default printer. You can specify a particular printer with -P :

Or, to change your default printer, use the lpoptions command:

You can specify various options for your print job with the -o option. Pass as many options as you’d like.

$ lp -o landscape -o fit-to-page -o media=A4 filename.jpg

A full list of options and other commands can be found in the help section of the web control panel.

The Help section of CUPS shows a long list of commands and options that can be used

Controlling the CUPS service

If you’re experiencing problems with CUPS, it can be helpful to restart the service. Controlling the process can be done with systemctl commands on Linux distros with systemd.

To start, stop, or restart CUPS:

$ sudo systemctl start cups $ sudo systemctl stop cups $ sudo systemctl restart cups

To check on the status of CUPS, and enable or disable it from starting automatically upon system boot:

$ systemctl status cups $ sudo systemctl enable cups $ sudo systemctl disable cups

Status of the CUPS service, displayed with systemctl command

Conclusion

In this guide, we learned about CUPS, the Linux print manager. We saw how to use it to add printers to our system and control the print spooler. We also saw how to access CUPS from the command line, and systemctl commands which provide us with basic troubleshooting options.

Читайте также:  Kali linux настройка общей папки

Comments and Discussions

NEWSLETTER

Subscribe to Linux Career Newsletter to receive latest news, jobs, career advice and featured configuration tutorials.

WRITE FOR US

LinuxConfig is looking for a technical writer(s) geared towards GNU/Linux and FLOSS technologies. Your articles will feature various GNU/Linux configuration tutorials and FLOSS technologies used in combination with GNU/Linux operating system.

When writing your articles you will be expected to be able to keep up with a technological advancement regarding the above mentioned technical area of expertise. You will work independently and be able to produce at minimum 2 technical articles a month.

TAGS

  • VIM tutorial for beginners
  • How to install the NVIDIA drivers on Ubuntu 20.04 Focal Fossa Linux
  • Bash Scripting Tutorial for Beginners
  • How to check CentOS version
  • How to find my IP address on Ubuntu 20.04 Focal Fossa Linux
  • Ubuntu 20.04 Remote Desktop Access from Windows 10
  • Howto mount USB drive in Linux
  • How to install missing ifconfig command on Debian Linux
  • AMD Radeon Ubuntu 20.04 Driver Installation
  • Ubuntu Static IP configuration
  • How to use bash array in a shell script
  • Linux IP forwarding – How to Disable/Enable
  • How to install Tweak Tool on Ubuntu 20.04 LTS Focal Fossa Linux
  • How to enable/disable firewall on Ubuntu 18.04 Bionic Beaver Linux
  • Netplan static IP on Ubuntu configuration
  • How to change from default to alternative Python version on Debian Linux
  • Set Kali root password and enable root login
  • How to Install Adobe Acrobat Reader on Ubuntu 20.04 Focal Fossa Linux
  • How to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux
  • How to check NVIDIA driver version on your Linux system
  • Nvidia RTX 3080 Ethereum Hashrate and Mining Overclock settings on HiveOS Linux

LATEST TUTORIALS

  • Enabling SSH on Raspberry Pi: A Comprehensive Guide
  • Boot Your Raspberry Pi from a USB: A Tutorial
  • Checking Your Raspberry Pi’s OS Version
  • Install an OS on Your Raspberry Pi: Step-by-Step
  • Finding Your Raspberry Pi’s IP Address: A Quick Guide
  • Easy Steps to Update Your Raspberry Pi
  • Connecting Your Raspberry Pi to Wi-Fi: A How-To
  • How to install RealVNC viewer on Linux
  • How to check Raspberry Pi RAM size and usage
  • How to check Raspberry Pi model
  • Understanding UEFI and BIOS in Relation to Linux Nvidia Driver Installation
  • How to orchestrate Borg backups with Borgmatic
  • How to monitor filesystem events on files and directories on Linux
  • Debian USB Firmware Loader Script
  • How to install and self host an Ntfy server on Linux
  • How to backup your git repositories with gickup
  • How to bind an SSH public key to a specific command
  • Creating a Bootable USB for Windows 10 and 11 on Linux
  • How to list all displays on Linux
  • List of QR code generators on Linux

Источник

Оцените статью
Adblock
detector