exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 58 discussion

Actual exam question from CompTIA's XK0-004
Question #: 58
Topic #: 1
[All XK0-004 Questions]

Which of the following commands would show the default printer on a Linux system?

  • A. lpr
  • B. lpq
  • C. lpstat
  • D. lspci
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
KingMatt
Highly Voted 4 years, 11 months ago
The answer is C.
upvoted 7 times
...
o0o0
Highly Voted 4 years ago
lpq displays the queue of available printers....So B is correct
upvoted 7 times
...
edwram
Most Recent 2 years, 6 months ago
Selected Answer: B
The default printer When print programs are not given a -P printername they use the default printer. The default printer can be configured by each user by using lpoptions. For example, lpoptions -d cis2 will cause your default printer to be cis2. If the option is not set, then the programs will use default configured for the host the program is run on. Hosts are configured to go to a printer close to them, by default, or at least in the same building. To find the default printer just type lpq. This will show the status for default printer including the location.
upvoted 1 times
...
braveheart22
2 years, 6 months ago
C is the correct option. Check the man pages for lpstat and you will see the resolution.
upvoted 1 times
...
MeisAdriano
3 years, 2 months ago
Selected Answer: C
wrong. A) wrong because "lpr" submits files to print B) wrong because "lpq" is a printer spooler, for queries. C) valid because the question ask "SHOW the default printer..." D) wong because lspci show PCI devices, not just printers.
upvoted 3 times
...
msour
3 years, 3 months ago
IPQ is the right one, lot confusion out there, But be confident and take the IPQ
upvoted 4 times
...
bigdraws
3 years, 10 months ago
answer C is correct https://staff.eecis.udel.edu/docs/printing/linux/#:~:text=To%20find%20the%20default%20printer,want%20Asto%20make%20the%20default.
upvoted 3 times
[Removed]
2 years, 8 months ago
But even in the URL that "bigdraws" cites above, it clearly states to obtain the default printer use lpq command.
upvoted 1 times
...
bigdraws
3 years, 10 months ago
I meant B
upvoted 3 times
...
...
JosiahJ
4 years ago
The answer is C. https://www.computerhope.com/unix/ulpstat.htm
upvoted 1 times
...
alex85
4 years, 2 months ago
On Unix-like operating systems, the lpq command lists the status of all available printers.
upvoted 1 times
...
stonegg
4 years, 2 months ago
B is the correct answer. If there is no printing job on your printer, lpstat won't show you anything.
upvoted 4 times
...
alfre
4 years, 5 months ago
C. lpstat
upvoted 1 times
...
jeffnoble14
4 years, 11 months ago
lpq shows the current print queue status on the named printer. Jobs queued on the default destination will be shown if no printer or class is specified on the command-line. lpstat displays status information about the current classes, jobs, and printers. When run with no arguments, lpstat will list active jobs queued by the current user. -d Shows the current default destination. So, lpstat -d will show the default print destination(default printer)
upvoted 5 times
...
pontonr12
4 years, 11 months ago
I agree C is correct. lpq will show current printer quece.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago