30

My Debian distro provide the lp and lpr commands for printing from CUPS.

I am a noob to printing in UNIX but have other tech skills.

I tried to find a difference in man lp and man lpr. It seems that lp only have more options...

The gv utility uses lp. I found older threads that explain that lpr is for network printing, while lp is a wrapper around lpr...

I just enjoyed reading:

2 Answers 2

32

LPR is part of the original BSD printing system. It was fairly simple and straightforward, but it didn't have all the management capabilities that large print environments wanted. You could hack it to do all sorts of things by shoving filters in the right place, but it was pretty kludgy. It also included a very limited network functionality allowing you to send jobs to a remote printer, but since the protocol was only designed with plain text in mind, it never really had provisions for determining types of documents and translating them to what the printer could understand. Ad-hoc workarounds helped. Since the network protocol was so simple, lots and lots of network printers support it.

System V designed a bigger system which allowed you to have things like printer classes, and a print job would go to the first free printer in the class. (For example, if you had a machine room with three printers.) It also tried to build in more formalized support for filters and things like that, but alas, it's also really, really old and not really designed for networked environments.

Nowadays, nobody really uses either system. CUPS has taken over the print systems, but it offers the command line tools for both lpr and SYSV printing (lp). That's just for compatibility. You can use either command you find easiest.

1
  • 20
    If CUPS have taken over then what is the CUPS command used instead of lp and lpr? Jan 20, 2019 at 18:43
3

CUPS itself has a nice page explaining the options for both: Command-Line Printing and Options. It states:

CUPS provides both the System V (lp) and Berkeley (lpr) printing commands for printing files.

Neither of the commands is considered preferred or superior. They are both included in CUPS to provide compatibility with both the System V and Berkeley legacy systems. Have a look at both program's man pages (lp, lpr) to see which options they support and use whichever one you like best!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .