Jobs submitted with no destination named are coming out on the wrong printer. Which command reports which destination CUPS currently treats as the default?

LPIC-1 Exam 102-500, objective 108. Essential system services medium

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Correct lpstat -d

Correct. -d shows the current default destination, that is, the one a job gets when neither lp -d nor lpr -P names a printer.

Not correct lpstat -p

Wrong. -p lists every printer with its state, whether idle, printing or disabled, and the reason for a disabled state. It does not mark which one is the default.

Not correct lpstat -a

Wrong. -a reports whether each destination is accepting requests, which is the queue-level accept or reject state. That is unrelated to which destination is chosen by default.

Not correct lpoptions -d

Wrong, and it changes things. lpoptions -d printer sets the calling user's default destination, writing it to ~/.cups/lpoptions. It is the command that creates the override, not the one that reports the system default.

Why

The destination for an unqualified job is resolved in order: the LPDEST or PRINTER environment variable, then the user's own default in ~/.cups/lpoptions, then the server default set with lpadmin -d. lpstat -d prints the destination that resolution currently arrives at, which is why it is the command to run when jobs surface on the wrong printer; lpstat -t includes the same line as part of a full status dump. Note that lpoptions -d is the command that sets a personal default, and a stale one is the usual reason a single user's jobs go astray while everyone else's are fine.

Where this comes from

Cited
manual page lpstat(1)

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 108 and space the ones you get wrong.

Practise LPIC-1 Exam 102-500

More questions on this objective

All questions on Essential system services

Practise LPIC-1 Exam 102-500