With the -n option, the lp command allows you to specify the number of copies of the document you want to print. $ lpq Color-LaserJet-CP2025dn is ready and printing Rank Owner Job File(s) Total Size active shs 234 agenda 2048 bytes The lpq command displays the print queue. $ lp "never leave home angry" $ lp never leave home angry If the file name includes whitespace (very rare on Linux systems), put the name in quotation marks or start typing the file name and press the Tab key to mark the file name separately (as in the second example below ). To print documents on the default printer, simply use the lp command followed by the name of the file you want to print.
enabled since Tue 05:07:45 PM EDT system default destination: Color-LaserJet-CP2025dn Useful commands
$ lpstat -p -d printer Color-LaserJet-CP2025dn is idle. The lpstat -p command displays the status of the printer and the lpstat -p -d command also lists available printers. Use the -p option to specify one of the available printers. The lpoptions command will display the default printer settings. $ lpinfo -v network ipp network https network socket network beh direct hp network lpd file cups-brf:/ network ipps network http direct hpfax network dnssd://HP%20Color%20LaserJet%20CP2025dn%20(F47468)._pdl-datastream._tcp.local/ <= printer network socket://192.168.0.23 <= printer IP
With the -v option, the lpinfo command will list drivers and related information.
$ lpoptions | tr " " 'n' copies=1 device-uri=dnssd://HP%20Color%20LaserJet%20CP2025dn%20(F47468)._pdl-datastream._tcp.local/ finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=1553023232 marker-colors=#000000,#00FFFF,#FF00FF,#FFFF00 marker-levels=18,62,62,63 marker-names='Black Cartridge HP CC530A, Cyan Cartridge HP CC531A, Magenta Cartridge HP CC533A, Yellow Cartridge HP CC532A' marker-types=toner,toner,toner,toner number-up=1 printer-commands=none printer-info='HP Color LaserJet CP2025dn (F47468)' printer-is-accepting-jobs=true printer-is-shared=true printer-is-temporary=false printer-location printer-make-and-model='HP Color LaserJet cp2025dn pcl3, hpcups 3.18.7' printer-state=3 printer-state-change-time=1553023232 printer-state-reasons=none printer-type=167964 printer-uri-supported=ipp://localhost/printers/Color-LaserJet-CP2025dn sides=one-sided NOTE : In the output below, some lines are reconnected to make this output more readable.
The output will look like this: $ lpoptions copies=1 device-uri=dnssd://HP%20Color%20LaserJet%20CP2025dn%20(F47468)._pdl-datastream._tcp.local/ finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=1553023232 marker-colors=#000000,#00FFFF,#FF00FF,#FFFF00 marker-levels=18,62,62,63 marker-names='Black Cartridge HP CC530A,Cyan Cartridge HP CC531A,Magenta Cartridge HP CC533A,Yellow Cartridge HP CC532A' marker-types=toner,toner,toner,toner number-up=1 printer-commands=none printer-info='HP Color LaserJet CP2025dn (F47468)' printer-is-accepting-jobs=true printer-is-shared=true printer-is-temporary=false printer-location printer-make-and-model='HP Color LaserJet cp2025dn pcl3, hpcups 3.18.7' printer-state=3 printer-state-change-time=1553023232 printer-state-reasons=none printer-type=167964 printer-uri-supported=ipp://localhost/printers/Color-LaserJet-CP2025dn sides=one-sided To view printer settings from the command line, use the lpoptions command. The latest tech news, global tech news daily, tech news today, startups, usa tech, asia tech, china tech, eu tech, global tech, in-depth electronics reviews, 24h tech news, 24h tech news, top mobile apps, tech news daily, gaming hardware, big tech news, useful technology tips, expert interviews, reporting on the business of technology, venture capital funding, programing language