You may have read about my recent 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’d always shared my public folder on my internal network, so I could easily share files between machines (without emailing them or without bouncing them between machines and any cloud service) ).
I quickly realized that Ubuntu Budgie not only did not have a simple means of sharing folders over a network, it also did not include a GUI method for sharing printers. Given that my wife is always printing out knitting patterns, return labels, and other bits of information (and the only printer in the house is connected to my desktop), I had to share that printer, Before that I was inundated with things to print for him.
ALSO: How to Choose the Right Linux Desktop Distribution for You
Luckily, this isn’t my first rodeo with printer sharing in Linux, so it only took me a few minutes to get it up and running. If you have a similar need, let me show you how easy it is to share printers in your LAN with CUPS (Common Unix Printer Service) and Samba, which provides file and print services between clients on different operating systems .
One thing to keep in mind when doing this — printers can be very finicky, so not every setup will work with every piece of hardware. Just ask any IT admin their opinion about printers and you’ll get the information in no time.
How to share a printer on your LAN from Linux
what you’ll need: The things you will need for this process are a running instance of Linux, a printer that is already connected (and working), and a user with sudo privileges.
Too: 8 Things You Can Do With Linux That You Can’t With MacOS or Windows
I will be demonstrating on Ubuntu Budgie, which is based on Ubuntu. If you use a different distribution, the only thing you need to change is the order in which Samba is installed. That’s it. let’s get to work.
If Samba is not already installed, you can do so by opening a terminal window and issuing the command:
sudo apt-get install samba -y
After installation, you’ll want to make sure Samba is set to start on 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 at the line that starts with 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 pressing the Ctrl+x keyboard shortcut.
Now it’s 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,
Too: The Most Important Reason You Should Use Linux at Home
Next, you need to set browsing to yes. Find the line:
# Show shared printers on the local network.
Make sure the following is directly below it:
In the same file, look at the section that starts with:
That section should look something like this (be sure to substitute your network’s IP address):
<Location /> Order allow,deny Allow localhost Allow 192.168.1.* </Location>
Save and close the file.
Since we have changed the Samba configuration file, we need to restart the service with the command:
sudo systemctl restart smb
sudo systemctl restart cups
At this point, the printer connected to your Linux machine should be visible on your network. One thing you may need to do is download and install the printer drivers on the machine you plan to print from.
Also: Thinking of 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 from which you want to print. If you go to print to a shared printer and find that your OS can see the printer but cannot print, download and install the printer driver and you should be good to go.











