How to Enable Network Printing on Arch Linux
Categories:
5 minute read
Enabling network printing on Arch Linux involves setting up a printing system that can either share printers with other devices on the network or connect to network-shared printers. Arch Linux provides the flexibility and tools necessary to create a lightweight yet powerful printing setup, whether for home or enterprise environments.
This guide walks you through setting up CUPS (Common Unix Printing System), configuring network sharing, installing drivers, and troubleshooting common issues.
Table of Contents
- Introduction to Network Printing
- Installing CUPS on Arch Linux
- Starting and Enabling the CUPS Service
- Configuring the CUPS Web Interface
- Adding and Managing Printers
- Enabling Printer Sharing Over the Network
- Client-Side Configuration
- Firewall Configuration
- Common Printer Drivers and Backend Support
- Troubleshooting
- Conclusion
1. Introduction to Network Printing
Network printing allows multiple devices to access a single printer over a local network. You can:
- Share a USB-connected printer over the network (host mode).
- Connect to a remote printer shared by another system (client mode).
- Use a printer with built-in networking (e.g., Wi-Fi or Ethernet capable).
On Arch Linux, the CUPS printing system is the standard choice for managing printers and print jobs. It supports both network and local printing, and it integrates well with graphical desktop environments or headless setups.
2. Installing CUPS on Arch Linux
To begin, ensure your system is updated:
sudo pacman -Syu
Then install CUPS and required dependencies:
sudo pacman -S cups cups-pdf system-config-printer
Explanation:
cups
: Main printing system.cups-pdf
: Optional, for printing to PDF.system-config-printer
: Optional graphical tool to configure printers (especially useful in GNOME, KDE, etc.).
If you are using a USB printer, install hplip
(for HP), splix
(for some Samsung models), or other backend drivers as needed.
3. Starting and Enabling the CUPS Service
To start the printing service and ensure it persists across reboots:
sudo systemctl start cups.service
sudo systemctl enable cups.service
You can verify the service status with:
systemctl status cups.service
4. Configuring the CUPS Web Interface
CUPS provides a web-based interface accessible via a browser:
http://localhost:631
If this does not load, ensure your user is part of the lp
and sys
groups:
sudo usermod -aG lp,sys $USER
Then restart your session or log out/in.
The web interface allows you to:
- Add printers
- Manage jobs
- Configure network sharing
- Modify printer options
5. Adding and Managing Printers
USB or Direct-Connected Printers
- Plug in your printer.
- Open
http://localhost:631
. - Go to Administration > Add Printer.
- Enter your root or sudo user credentials when prompted.
- Select your printer from the local list.
- Choose the correct driver from the list or provide a PPD file.
- Set a name and description.
- Finish the setup.
Network Printers (IPP, JetDirect, etc.)
If your printer has an IP address, you can manually add it:
- Go to Add Printer.
- Choose a network protocol:
- IPP:
ipp://192.168.x.x/ipp/print
- LPD:
lpd://192.168.x.x/queue
- JetDirect:
socket://192.168.x.x
- IPP:
- Continue the setup as with a USB printer.
6. Enabling Printer Sharing Over the Network
If you want your Arch system to act as a print server, share the printer:
- Open
/etc/cups/cupsd.conf
in your favorite editor:
sudo nano /etc/cups/cupsd.conf
- Modify or add the following directives:
# Allow web access from local network
Listen 631
Port 631
Browsing On
BrowseLocalProtocols dnssd
# Allow access to web interface and shared printers
<Location />
Order allow,deny
Allow @LOCAL
</Location>
<Location /admin>
Order allow,deny
Allow @LOCAL
</Location>
<Location /printers>
Order allow,deny
Allow @LOCAL
</Location>
<Location /classes>
Order allow,deny
Allow @LOCAL
</Location>
- Restart CUPS:
sudo systemctl restart cups.service
- In the CUPS web interface, go to:
- Administration > Server Settings
- Enable Share printers connected to this system and Allow printing from the internet if required.
- Save and restart the service.
7. Client-Side Configuration
If another Linux system wants to use the shared printer:
- Install
cups
and enable the service. - Modify
/etc/cups/client.conf
(create if not exists):
ServerName 192.168.x.x
Replace with the IP address of the server.
- Restart CUPS:
sudo systemctl restart cups.service
The client should now automatically see the shared printers.
Alternatively, clients can use the CUPS web interface to manually add the network printer using its IPP or socket URL.
8. Firewall Configuration
If a firewall is enabled (e.g., iptables
, nftables
, ufw
, or firewalld
), ensure the following ports are open:
- TCP 631 (IPP, CUPS web interface)
- TCP 9100 (JetDirect, if applicable)
- UDP 5353 (mDNS/Avahi for automatic discovery)
Example with iptables
sudo iptables -A INPUT -p tcp --dport 631 -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 9100 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 5353 -j ACCEPT
9. Common Printer Drivers and Backend Support
Many printers work out of the box with built-in drivers, but others may need specific packages:
- HP printers:
hplip
- Canon:
canon-pixma
(AUR),cnijfilter2
(AUR) - Brother: Often require downloading PPD files or using AUR drivers
- Generic PCL/PostScript: Use built-in drivers
To install HP support:
sudo pacman -S hplip
You may need to run:
hp-setup
For Samsung legacy printers:
yay -S splix
For network discovery, install avahi
:
sudo pacman -S avahi
sudo systemctl enable --now avahi-daemon.service
10. Troubleshooting
Printer not found
- Ensure it’s turned on and connected.
- Check if Avahi is running.
- Try manually entering the IPP/Socket address.
Access denied
- Ensure your user is in the correct groups (
lp
,sys
). - Check CUPS permissions in
cupsd.conf
.
Printing fails
- Verify logs at
/var/log/cups/error_log
. - Try printing a test page from the web interface.
Web interface not loading
- Confirm
cups.service
is running. - Check firewall or network settings.
11. Conclusion
Network printing on Arch Linux is flexible and reliable with the help of CUPS. Whether you’re setting up a print server or connecting to a shared network printer, Arch gives you the tools to build exactly what you need without unnecessary bloat.
By installing the right drivers, configuring access properly, and using either the web interface or command line, you can manage printers efficiently in any environment. If you’re deploying in a larger setting or automating installations, consider using Ansible or scripts to provision CUPS settings and printers as part of your system configuration.
With the right setup, printing on Arch can be just as smooth—if not smoother—than on other desktop-oriented distributions.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.