Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rank-math domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u596154002/domains/usbusinessreviews.com/public_html/wp-includes/functions.php on line 6114
How to share a printer on Linux with CUPS and Samba - Best Business Review Site 2024

How to share a printer on Linux with CUPS and Samba

[ad_1]

Person using printer

Krit of Studio OMG/Getty Images

You might have read about my recent spate of distro hopping, where I landed with Ubuntu Budgie as my primary operating system. A few days after installing the OS, I realized I’d forgotten that I always share my Public folder to my internal network, so I can easily share files between machines (without having to email them or bounce them between machines and any given cloud service). 

I quickly realized that Ubuntu Budgie not only didn’t have a simple means of sharing folders to a network, it also didn’t include a GUI method for sharing printers. Given my wife is always printing out knitting patterns, return labels, and other bits of information (and the only printer in the house is attached to my desktop), I had to get that printer shared before I was inundated with things to print for her.

Also: How to choose the right Linux desktop distribution for you

Fortunately, this isn’t my first rodeo with printer sharing in Linux, so it only took me a couple of minutes to get that up and running. If you have a similar need, let me show you how easy it is to share a printer to your LAN with CUPS (Common Unix Printer Service) and Samba, which provides file and print services between clients across various operating systems.

One thing to keep in mind as you do this — printers can be very finicky, so not every setup works with every piece of hardware. Just ask any IT admin for their opinion on printers and you’ll get an earful.

How to share a printer to your LAN from Linux

What you’ll need: The only things you’ll need for this process are a running instance of Linux, a printer already attached (and working), and a user with sudo privileges. 

Also: 8 things you can do with Linux that you can’t do with MacOS or Windows

I’ll demonstrate on Ubuntu Budgie, which is based on Ubuntu. If you use a different distribution, the only thing you should need to change is the command for installing Samba. That’s it. Let’s get to work.

In case Samba isn’t already installed, you can do so by opening a terminal window and issuing the command:

sudo apt-get install samba -y

After the installation, you’ll want to make sure Samba is set to start at boot, which can be done with the command:

sudo systemctl enable --now smb

Next, we’ll configure Samba. Open the smb.conf file with the command:

sudo nano /etc/samba/smb.conf

First, look for the line that starts printing = and change it to:

Next, locate the [printers] section and make sure it looks like this:

[printers]
   comment = All Printers
   browseable = yes
   path = /var/spool/samba
   printable = yes
   guest ok = yes
   read only = yes
   create mask = 0700

Save and close the file by hitting the Ctrl+x keyboard shortcut.

It’s now time to configure CUPS. Open the config file with the command:

sudo nano /etc/cups/cupsd.conf

The first line to identify will look like this:

Change localhost to the IP address of the machine hosting the printer (which you can find by running the command ip a).

Also: The most important reason you should be using Linux at home

Next, you need to set Browsing to yes. Look for the line:

# Show shared printers on the local network.

Make sure the following is directly below it:

In the same file, look for the section that starts with:

That section should look something like this (making sure to change the IP address to that of your network):

<Location />
  Order allow,deny
  Allow localhost
  Allow 192.168.1.*
</Location>

Save and close the file.

Since we’ve changed the Samba configuration file, we need to restart the service with the command:

sudo systemctl restart smb

Finally, we need to restart CUPS with the command:

sudo systemctl restart cups

At this point, the printer attached to your Linux machine should appear on your network. One thing you might have to do is download and install the printer drivers to the machine you plan to print from. 

Also: Thinking about switching to Linux? 6 things you need to know

This action will depend on the printer you use and whether support for that printer is baked into the operating system you intend to print from. If you go to print from the shared printer and find your OS can see the printer but not print to it, download and install the printer driver and you should be good to go. 



[ad_2]

Source link

slot gacor slot gacor togel macau slot hoki bandar togel slot dana slot mahjong link slot link slot777 slot gampang maxwin slot hoki slot mahjong slot maxwin slot mpo slot777 slot toto slot toto situs toto toto slot situs toto situs toto situs toto situs toto slot88 toto slot slot gacor thailand slot bet receh situs toto situs toto slot toto slot situs toto situs toto situs toto situs togel macau toto slot slot demo slot pulsa slot pragmatic situs toto deposit dana 10k surga slot toto slot link situs toto situs toto slot situs toto situs toto slot777 slot gacor situs toto slot slot pulsa 10k toto togel situs toto slot situs toto slot gacor terpercaya slot dana slot gacor pay4d agen sbobet kedai168 kedai168 deposit pulsa situs toto slot pulsa situs toto slot pulsa situs toto situs toto situs toto slot dana toto slot situs toto slot pulsa toto slot situs toto slot pulsa situs toto situs toto situs toto toto slot toto slot slot toto akun pro maxwin situs toto slot gacor maxwin slot gacor maxwin situs toto slot slot depo 10k toto slot toto slot situs toto situs toto toto slot toto slot toto slot toto togel slot toto togel situs toto situs toto toto slot slot gacor slot gacor slot gacor situs toto situs toto cytotec toto slot situs toto situs toto toto slot situs toto situs toto slot gacor maxwin slot gacor maxwin link slot 10k slot gacor maxwin slot gacor slot pulsa situs slot 10k slot 10k toto slot toto slot situs toto situs toto situs toto bandar togel 4d toto slot toto slot situs toto toto slot toto togel situs toto