Printing on Linux today: CUPS, driverless IPP and printer apps
Most printers sold in the last fifteen years print on Linux with no driver at all. They speak IPP (the Internet Printing Protocol) and announce themselves on the network, and CUPS, the Linux print system, finds them and prints to them as "IPP Everywhere" or AirPrint printers. You need a driver only for old or unusual models, and even then the modern answer is a printer application rather than a PPD driver.
How printing works now
Driverless printing works the same way whatever the label on the box (AirPrint, IPP Everywhere, Mopria, Wi-Fi Direct Print):
- The printer announces itself with DNS-SD (multicast DNS, also called Bonjour or zeroconf; Avahi on Linux).
- CUPS finds it, asks it over IPP for its paper sizes, trays, duplex and quality options, and creates a queue.
- Your application sends PDF; CUPS converts it to a format the printer accepts (PDF, PWG Raster, Apple Raster or PCLm) and passes your choices along.
- The printer reports progress, errors and ink or toner levels back over IPP. When the printer goes away, the automatic queue goes too.
Install and start CUPS
Desktop installs of Fedora, Ubuntu, Debian and openSUSE include CUPS. On a minimal system or Arch:
# Debian, Ubuntu
sudo apt install cups avahi-daemon
# Fedora, RHEL, Alma, Rocky
sudo dnf install cups avahi
sudo systemctl enable --now cups avahi-daemon
# Arch (also set up .local name resolution with nss-mdns, see the ArchWiki Avahi page)
sudo pacman -S cups avahi nss-mdns
sudo systemctl enable --now cups.service avahi-daemon.service
CUPS discovers printers only through Avahi, so avahi-daemon must be running even if you use systemd-resolved for normal name lookups. Check the scheduler:
lpstat -r
It should print scheduler is running. CUPS also has a web interface at http://localhost:631/ (only reachable from the same machine by default).
Find your printer
lpstat -e # every destination CUPS can see, including network printers
lpstat -l -e # with more detail
ippfind --ls # IPP printers announced on the network and their status
If your printer is listed by lpstat -e, you can usually print to it right away: desktop print dialogs show it, and CUPS creates a temporary queue on first use. For a USB printer, check that the system sees it with lsusb. Many recent USB printers support IPP-over-USB; install the ipp-usb package and the printer appears like a network printer, with its web page and scanner too.
Add a permanent queue
A permanent queue gives the printer a short name for scripts and lets you set default options:
sudo lpadmin -p office -E -v ipp://office-printer.local/ipp/print -m everywhere
sudo lpadmin -d office
-p officenames the queue.-Eafter-penables the queue and makes it accept jobs. (Before-p,-Emeans "use encryption"; the man page calls this double meaning a historical oddity.)-vis the device URI. Use the printer's.localname or its IP address, for exampleipp://192.168.1.50/ipp/print;ipps://uses TLS.-m everywheretells CUPS to ask the printer for its capabilities. This is the only model that will survive into future CUPS versions.lpadmin -dsets the system-wide default printer.
Without sudo, you need to be in a printer-admin group: lpadmin on Debian and Ubuntu, sys or wheel on Arch; the list for your system is SystemGroup in /etc/cups/cups-files.conf. The same groups can log in to the web interface's Administration page. Remove a queue with sudo lpadmin -x office.
Print and manage jobs
lp document.pdf # default printer
lp -d office -n 2 report.pdf # two copies on "office"
lp -d office -o sides=two-sided-long-edge -o media=A4 report.pdf
lp -d office -P 1-3 report.pdf # pages 1 to 3 only
lpoptions -d office # your personal default printer
lpoptions -p office -o sides=two-sided-long-edge # your default: duplex on "office"
lpstat -p -d # printers, their state, the default
lpstat -o # queued jobs
cancel office-42 # cancel job 42
cancel -a office # cancel all jobs on "office"
Personal defaults set with lpoptions are stored in ~/.cups/lpoptions; when run as root they go to /etc/cups/lpoptions for everyone. lpr also works for people used to the BSD commands.
Older printers: printer applications
If a printer does not support IPP, it needs a driver. CUPS's classic drivers (PPD files plus filters) still work in the current 2.4 series (2.4.20 is the latest release as of November 2026), but they are deprecated: lpadmin warns that every model except everywhere "will not be supported in a future version of CUPS", and the coming CUPS 3 supports only driverless printers and printer applications.
A printer application is a small service that talks to one family of printers and presents each of them to CUPS as a driverless IPP Everywhere printer, usually with its own web page for settings. Most are built on PAPPL, a C framework for printer applications (version 1.4.12 as of November 2026). Examples are LPrint for label printers and the HP Printer Application. OpenPrinting recommends shipping printer applications as Snap packages, so that one package works on every distribution; check your distribution's repositories too. After you install and start one, its printers show up in lpstat -e like any network printer, and you add them with -m everywhere.
If your distribution still offers a PPD driver package for your printer (for example Gutenprint, HPLIP or foomatic), it will keep working for now; just expect to move to a printer application later.
Share a printer
sudo lpadmin -p office -o printer-is-shared=true
sudo cupsctl --share-printers
CUPS then announces the queue on the local network, and other computers and phones can find it as a driverless printer. Allow mDNS (UDP port 5353) and IPP (TCP port 631) through the firewall on the server (see Firewall HOWTO). cupsctl --remote-admin opens the web administration to other machines; leave it off unless you need it. To print to a printer shared by Windows, see SMB HOWTO.
Troubleshooting
- Printer not found
- Check that
avahi-daemonis running, that the computer and printer are on the same network segment (mDNS does not cross routers or guest Wi-Fi isolation), and that your firewall allows UDP 5353. If discovery still fails, add the queue by IP address withlpadminas shown above. - Queue shows "stopped" or "Paused"
- CUPS stops a queue after an error. Fix the cause, then run
sudo cupsenable office;sudo cupsaccept officeif it also rejects jobs. - Jobs stay in the queue
lpstat -tshows everything at once: scheduler, default, devices, queue states and jobs. Check the printer's own display or web page for paper jams or empty trays.- "Filter failed" or garbage output
- The format sent does not match the printer. Re-create the queue with
-m everywhere, or use a printer application for a non-IPP model. - Need details
- Turn on debug logging with
sudo cupsctl --debug-logging, print again, and read/var/log/cups/error_log(orsudo journalctl -u cupson systems that log to the journal). Turn it off withsudo cupsctl --no-debug-logging.
Mistakes to avoid
- Downloading a vendor's old Linux driver for a printer that already supports AirPrint or IPP Everywhere: the driverless queue usually works better.
- Editing
/etc/cups/printers.confby hand. The man page says not to; uselpadminor the web interface. - Disabling Avahi to "speed up boot" and then wondering why printers vanish.
- Opening port 631 to the Internet. Share printers on the local network only.
The classic Printing HOWTO, from the days of lpd, LPRng and Ghostscript drivers, is kept by the Linux Documentation Project at tldp.org.
Sources
- OpenPrinting CUPS and OpenPrinting CUPS v3, OpenPrinting
- Command-Line Printer Administration and Command-Line Printing and Options, CUPS documentation
- lpadmin(8), lpstat(1), lp(1), lpoptions(1), cancel(1), cupsenable(8), cupsctl(8), ippfind(1), CUPS manual pages
- CUPS releases, OpenPrinting on GitHub
- Driverless printing and Overview of printer applications, OpenPrinting
- PAPPL printer application framework, msweet.org
- ipp-usb, OpenPrinting on GitHub
- CUPS, ArchWiki