Introduction
This lesson is about printing on Linux without turning it into a full printer-admin course.
The main question is:
How do you understand printer queues, inspect jobs, and use basic CUPS and LPD-compatible printing commands?
What you should be able to do after this lesson:
- Understand the role of CUPS.
- Recognize the idea of a print queue.
- Submit, inspect, and remove print jobs.
- Know the classic commands
lpr,lpq, andlprm. - Understand the difference between local and remote printers.
Big Idea: Printing Is Mostly Queue Management
Beginners often imagine printing as a single direct action. In Linux, it is usually better to think like this:
user sends a job -> the job enters a queue -> the print service hands it to a printer
That is why so many printing commands are about:
- checking queues
- listing printers
- canceling stuck jobs
- looking at service status
CUPS
Most Linux printing today uses CUPS:
Common UNIX Printing System
Its job is to:
- manage printers
- accept print jobs
- keep track of queues
- talk to local or remote printers
Common configuration directory:
/etc/cups/
You do not need deep CUPS administration for LPIC-1. You do need to understand the basic workflow.
Printers and Queues
A printer queue is the waiting line of jobs for a printer.
That means you should be able to answer:
- What printers are available?
- Is my job waiting?
- Is the printer paused or stopped?
- Can I remove a stuck job?
Useful commands on many systems:
lpstat -p -d
lpstat -t
An administrator can create or modify a CUPS destination with lpadmin. For example, configuration can select a device URI, model or driver information, sharing behavior, and whether the queue is enabled. Because these settings affect real printers, inspect the command and CUPS documentation before changing an existing destination.
lpadmin -p <printer_name> -E -v <device_uri> -m <model>
The exact model handling differs between traditional driver-based and modern driverless printing. For LPIC-1, remember that lpadmin administers printer queues while lpr submits jobs.
Submitting a Job
Classic command:
lpr file.txt
This sends a print job to the default printer.
If you want a specific printer:
lpr -P printer_name file.txt
You do not need to memorize every option.
The important thing is understanding that lpr submits a job into a queue.
Inspecting the Queue
Classic command:
lpq
This shows jobs currently waiting in the printer queue.
Many systems also support:
lpstat -o
That is useful when a user says:
- "I printed something but nothing happened."
Often the job is simply still queued, blocked, or paused.
Removing a Job
Classic command:
lprm <job_id>
Some systems also support:
cancel <job_id>
The key beginner idea:
- if a job is stuck, remove it from the queue first
- then test printing again with a simple text file
Local vs Remote Printers
Linux can print to:
- a printer attached directly to the machine
- a network printer
- a printer shared by another host
At LPIC-1 level, you just need to understand that CUPS can manage both local and remote printers.
Basic Troubleshooting
When printing fails, check in this order:
- is the CUPS service running?
- does Linux know about the printer?
- is the job in the queue?
- is the printer paused or stopped?
- can you print a very small plain text file?
That simple order solves many beginner problems.
Practice Step by Step
1) Inspect printers and the default destination
- Run:
lpstat -p -d - If there is no printer configured, note that this is also useful information.
- Then run:
lpstat -t - Look for printer status and queue information.
2) Submit a tiny text job
- Create a small file:
printf 'Linux printing practice\n' > /tmp/print-test.txt - If a printer is configured, send it:
lpr /tmp/print-test.txt - Check the queue:
lpq
3) Remove a queued job
- Check the queue:
lpq - If a test job is listed, remove it:
lprm <job_id> - Check again:
lpq
Cheat Sheet
lpstat -p -d
lpstat -t
lpadmin -p <printer_name> -E -v <device_uri> -m <model>
lpr file.txt
lpr -P printer_name file.txt
lpq
lprm <job_id>
cancel <job_id>
systemctl status cups
ls /etc/cups/
Legacy / Exam Note
LPIC still mentions the LPD-compatible commands lpr, lpq, and lprm.
Modern Linux printing usually sits on top of CUPS, but those older-style commands are still worth recognizing for the exam and for troubleshooting.
Test Your Knowledge
Complete the quiz to assess your understanding of this course's concepts.
