In traditional BSD-style printing on Unix/Linux, which command submits a print job (adds it to the printer queue)?
-
Alpd
-
Blpr
-
Clpq
-
Dlpc
-
ENone of the above
Answer
Correct Answer: lpr
Explanation
Introduction / Context:Legacy printing systems on Unix-like OSes follow the BSD model, where different commands handle submission, status checks, and administration. Recognizing which command queues a job is critical when working with older systems or CUPS in BSD compatibility mode.
Given Data / Assumptions:
- BSD printing commands are available (or CUPS BSD compatibility).
- We need to submit a file to the print queue.
- We are not managing the daemon or querying status.
Concept / Approach:
lpr submits (prints) files. lpd is the line printer daemon. lpq checks the queue status, and lpc provides printer control (start/stop, etc.). On modern systems using CUPS, lpr remains the user-facing submission command in many setups.
Step-by-Step Solution:
Submit a job: lpr filename.pdfPick printer: lpr -P printer_name filename.pdfCheck queue: lpq -P printer_nameManage: lpc status/start/stopVerification / Alternative check:
After running lpr, confirm with lpq or CUPS web UI (http://localhost:631 ) if available. Logs can be checked under /var/log/cups/.
Why Other Options Are Wrong:
- lpd: daemon, not the user submission tool.
- lpq: queue status viewer.
- lpc: line printer control utility.
- None: incorrect because lpr is correct.
Common Pitfalls:
- Confusing System V lp with BSD lpr—both submit jobs in their respective models.
- Forgetting to specify a printer with -P when multiple printers are configured.
Final Answer:
lpr.