The lpr Command

Because Unix is a multiuser environment, it would only make sense that more than one person would be printing to a printer at any single time. When you print in Unix, your print job is sent with a print job number. This number is assigned to the job by Unix to track and complete the job. Canceling a print job after you start one is canceled based on that job number. The job is removed from the print queue and then you no longer have a print job pending.

Now that you understand the fundamentals of printing in Unix, let's take a look at how to actually get it done.

With the lpd (line printer daemon and its protocol) system available on your machine, you can use the lpr suite of commands to send print jobs to your printer. The

Get SAMS Teach Yourself Unix in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.