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. 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
- Official drivers
- GNOME
- XFCE / GTK common
- KDE
- Manual method of using CUPS
- 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
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.
GNOME will immediately try to detect your printer. It will list the available printers. Please choose what you want to add.
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
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.
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.
The printer management application will start searching for the right driver for your printer. It will take a bit of time, so be patient!
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.
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
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.
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.
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.
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.
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'.
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.
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.
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'.
You can now use the Print dialog box in any application to use the printer you have set up.
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.
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:
- Some tips for installing applications for Linux
- How to find, set and change IP addresses on Linux
- How to install and use Kali Linux on VmWare virtual machine
You should read it
- How to add a printer on Windows 11
- Create your own wireless printer with Raspberry Pi
- How to set up your own Git server on Linux
- How to set up WordPress for local development in Linux
- How to share a printer via LAN
- How to create dual boot Linux and Windows 10 on Linux
- The best 3D printers 2019
- 8 best AirPrint printers in 2021
- How to set up a Windows virtual machine in Linux
- Inkjet (inkjet) and laser printers: Which type is right for you?
- How to fix offline errors of printers on Windows 10
- The printer has ink smudges - Causes and ways to fix the printer ink smudge error
Maybe you are interested
Printer loses letters and letters - Fixing the error is not difficult
4 creative ways to use a scanning printer
Top 5 best printers in 2024
Fix printer errors with blurred text and blurred lines
How to share a printer via Lan network - So that 2 or more computers can print at the same time
The printer cannot display default settings and what you need to do