https://retrohacker.substack.com/p/bye-cups-printing-with-netcat retrohacker Subscribe * About * Archive * Help * Log in Bye CUPS: Printing with netcat Turns out printing doesn't have to be hard William Blankenship [https] 57 min ago Share I recently migrated my daily laptop to FreeBSD. I have a networked HP LaserJet. After 10+ years of CUPS on Linux, I had been dreading setting up this printer on yet another machine. But the day came. I had to print quite a few documents so I decided to bite the bullet and setup printing on FreeBSD. Off to the FreeBSD Handbook I went. Conveniently, they have a chapter on Printing. Given my past experience with CUPS, I figured this was going to be a treacherous journey so I read the entire document before getting started. Section 4 stood out: Direct printing to network printers depends on the abilities of the printer, but most accept print jobs on port 9100, and nc(1) can be used with them. nc netlaser 9100 < sample.txt [https] I had to read this several times. WTF. Use netcat? Surely I was missing some wizardry in the FreeBSD kernel that configured a network printer as some local network target aliased to netlaser, which handled all the printing magic for me. But how? Years of arbitrarily picking from a list of similarly named print drivers in CUPS prevented my brain from accepting what was written. I was confused. After trying to decipher the other sections in the document, I decided I would go for it. nc 192.168.1.226 9100 < file.pdf It. Just. Prints. [https] After 10+ years of Linux distributions pushing CUPS on me. Over a decade of this complex stack of drivers and daemons that I never quite trusted but "couldn't live without." FreeBSD comes along and is like "yeah, just use netcat." And they're right. Just use netcat. Bye CUPS. Share [https] [ ] Create your profile Set photo[ ] [ ][ ] [ ] [ ] Sign up for the newsletter Save & Post Comment Only paying subscribers can comment on this post Already a paying subscriber? Log in Check your email For your security, we need to re-authenticate you. Click the link we sent to , or click here to log in. Ready for more? [ ]Subscribe (c) 2021 William Blankenship. See privacy, terms and information collection notice Publish on Substack retrohacker is on Substack - the place for independent writing This site requires JavaScript to run correctly. Please turn on JavaScript or unblock scripts