How to set up a printer in Linux

Printing is something that most people look down on. That's a basic function of a PC, but when you switch to another platform, like Linux, things can get complicated.

Printing is something that most people look down on. That's a basic function of a PC, but when you switch to another platform, like Linux, things can get complicated. Linux does not handle everything like other operating systems. Don't expect to run the driver setup wizard from a CD or a download. Instead, on most distributions, drivers may be installed or will be processed automatically.

How to set up a printer in Linux

  1. Official drivers
  2. GNOME
  3. XFCE / GTK common
  4. KDE
  5. Manual method of using CUPS
  6. Web-based CUPS interface

Official drivers

Some printer manufacturers provide official Linux drivers. Both HP and Brother are known to support Linux very well, through the release of their own printer drivers. Before you begin this process, visit the printer manufacturer's website to see if they support Linux.

This is a particularly good idea if your printer is a new model. While the Linux community is often excellent at supporting devices, they also primarily do this work based on the contributions of the volunteers. That means the driver for the latest devices will take some time to reach the user. Printer manufacturers can also have their own installation process, either via .deb or .rpm packages or can only provide PPD files that you can upload in the process to provide optimal printer drivers. manually.

In general, printing on Linux is not exclusively for a distribution. Instead, it is the desktop environment that determines which configuration tool you will use to set up your printer.

GNOME

How to set up a printer in Linux Picture 1How to set up a printer in Linux Picture 1

Open the GNOME Settings. This, like many other things, has been integrated into GNOME's basic functionality. When you're in the settings section, look for "Devices" in the left menu, then click the "Printers" tab on the next menu.

In the middle of the window, click the add printer button.

How to set up a printer in Linux Picture 2How to set up a printer in Linux Picture 2

GNOME will immediately try to detect your printer. It will list the available printers. Please choose what you want to add.

How to set up a printer in Linux Picture 3How to set up a printer in Linux Picture 3

It will start searching for available drivers. When completed, GNOME will automatically add your printer. You will be taken back to the Settings menu where you started and your printer will be listed.

XFCE / GTK common

How to set up a printer in Linux Picture 4How to set up a printer in Linux Picture 4

Open Print Settings in the "System" tab of the app launcher. Like most original XFCE components, you'll notice that the window is relatively simple and easy to understand. Click the big button at the top right to unlock the window and make changes. You will need to enter the password or password for the root directory.

How to set up a printer in Linux Picture 5How to set up a printer in Linux Picture 5

Click the "Add" button . It has a plus sign icon by default. A new larger window will open, displaying the list of available printers on the left and more detailed information about the selected printer on the right. Find your printer and press 'Forward' at the bottom right.

How to set up a printer in Linux Picture 6How to set up a printer in Linux Picture 6

The printer management application will start searching for the right driver for your printer. It will take a bit of time, so be patient!

How to set up a printer in Linux Picture 7How to set up a printer in Linux Picture 7

When the search is complete, you will see a new window with the list of major printer manufacturers listed as 'Recommended'. Click 'Forward' again and you will see your printer model listed on the left and the recommended driver on the right. If the model is listed similar to your printer, that might be what you need to find. If not, you can always try generic drivers. Click 'Forward' again when everything looks correct.

How to set up a printer in Linux Picture 8How to set up a printer in Linux Picture 8

The next screen requires you to name the printer and provide a brief description for it. After you do this, click the 'Apply' button to complete the printer installation. The system will set up everything and ask you to confirm whether you want to print a test page. That's absolutely your choice. Your printer is ready to use!

KDE

How to set up a printer in Linux Picture 9How to set up a printer in Linux Picture 9

Open Kickoff and go to the "Settings" tab . Find and click 'System Settings'. Scroll down to find the 'Printers' tab . When you first arrive, it will ask you to login with an admin account. If you have access to sudo, everything will be fine. If not, you will need to use root.

How to set up a printer in Linux Picture 10How to set up a printer in Linux Picture 10

Once you are logged in, click the button in the middle of the window to launch the printer add process. A new window will open, listing the available printers. Select a printer you want to set up.

How to set up a printer in Linux Picture 11How to set up a printer in Linux Picture 11

Plasma will try to find your driver. When it does a search, it will show you a list of printer manufacturers with the recommended driver at the top. If it does not find any drivers, it will introduce generic drivers. You can always browse the list and select the driver manually.

How to set up a printer in Linux Picture 12How to set up a printer in Linux Picture 12

Next, you can add a description for your printer. When you're done, click the "Finish" button . Your printer will be listed back on the installation screen where you started.

Manual method of using CUPS

If after trying the above method, your system still cannot detect the printer, then the last method is to configure it manually using CUPS.

Common Unix Printer Service (CUPS), actually developed by Apple, is the printer server that allows users to print in Linux. It can be used with a local computer, or with a group of networked computers. CUPS provides web-based configuration management tools for printers.

If your distribution does not have CUPS installed, use the appropriate command for your package manager to install it. For example, if you are running Ubuntu, the command will be:

 sudo apt install cups 

Start service with:

 sudo systemctl start cups 

or

 sudo /etc/init.d/cupsd start 

Note : if you don't want CUPS to run at all times, you can stop it by running:

 sudo systemctl stop cups 

or

 sudo /etc/init.d/cupsd stop 

If you are a professional user, you can modify the configuration file '/etc/cups/cupsd.conf.' The file will allow you to change certain printer settings, such as whether to turn on a shared printer and choose which authentication to use. If you make changes to this file while CUPS is running, don't forget to restart the server:

 sudo /etc/init.d/cupsd restart 

For more information on what you can do with the CUPS configuration file, visit:

 man cupsd.conf 

Web-based CUPS interface

Once you have run CUPS, you can access the web-based interface by opening the browser and navigating to localhost: 631. This address indicates that the server is running locally on port 631.

How to set up a printer in Linux Picture 13How to set up a printer in Linux Picture 13

To get started, plug in the printer and go to the "Administration" tab . In the 'Printers' section at the top left of the page, click 'Add Printer'.

How to set up a printer in Linux Picture 14How to set up a printer in Linux Picture 14

The server will ask you for your username and password. You can log in as root, but if you want regular users to be able to use the printer, you must add them to the lpadmin group . The command to add users to the group changes according to the distribution. On Ubuntu, it is:

 sudo usermod -aG lpadmin [username] 

If you're lucky, your printer will be discovered and displayed in lists of Local printers and Discovered network printers.

How to set up a printer in Linux Picture 15How to set up a printer in Linux Picture 15

Select the printer and click 'Continue'. In this example, the author is using a USB printer, but - as you can see in the screenshot above - it can also work for wireless printers. The CUPS interface will give you several options to configure the printer. Select 'Share This Printer' if you want to allow other users on your network to access the printer.

How to set up a printer in Linux Picture 16How to set up a printer in Linux Picture 16

Next, CUPS will try to automatically detect your printer model. If not correct, you can choose the correct model from the list of models that appear. If your specific model is not listed, you can provide the PostScript Printer Definition (PPD) file. Some manufacturers can provide PPD online for download.

Note: Some printers share the same PPD file with another model of the same brand or manufacturer. If you cannot find the PPD for your printer, contact the printer manufacturer for details. You can also find some printer drivers at OpenPrinting.org

If you are using Hewlett-Packard (HP) printers, the easiest way for CUPS to recognize it is to install Hewlett-Packard's Linux Imaging and Printing software (HPLIP). This collection of drivers may be included in one of the 'hplip' package repositories . After you have installed, refresh the 'Add Printer' page in your browser. If all goes well, your HP printer will now show up in the list of supported models.

After you have successfully added your printer, CUPS will show you some other configuration options. If you have a standard home printer, you may want to change the default media size to 'Letter'.

How to set up a printer in Linux Picture 17How to set up a printer in Linux Picture 17

You can now use the Print dialog box in any application to use the printer you have set up.

How to set up a printer in Linux Picture 18How to set up a printer in Linux Picture 18

When you are printing, you can return to the CUPS admin page and click the 'Jobs' tab to see a list of running print jobs and in the queue.

How to set up a printer in Linux Picture 19How to set up a printer in Linux Picture 19

Once you have followed the instructions above, your printer will work in Linux.

In most cases, setting up a printer in Linux is not as difficult as you think. It is usually detected as soon as you plug it into the system. In general, this process is relatively easy and rarely occurs.

Good luck!

See more:

  1. Some tips for installing applications for Linux
  2. How to find, set and change IP addresses on Linux
  3. How to install and use Kali Linux on VmWare virtual machine
4.2 ★ | 5 Vote