Study and Learning note
Printer
LP: To send a print job to a printer, lp command and specify what to print.
- -d: destination printer name to print. if this option is omitted, the lp use the default printer
- -n number : prints a certain number of copies
- -o option : option can be:
- cpi=number
- landscape
- number-up=number
- sides=string : the string can be either “two-sided-short-edge” or “two-sided-long-edge”.
- -q priority : 1 (low) to 100(high), default is 50
Spool (Print Queue) : /var/spool/cups
lpstat: show the state of the printer
- -a: displays a list of printers that are accepting print jobs
- -d: displays the default destination printer
- -o printer_name : display the print jobs in the print queue
- -p: displays enabled printers
- -r: show whether the CUPS daemon is running
- -t : show a list of all printers
Manipulate the printer status:
- cupsaccept printer_name
- cupsreject printer_name
- cupsdisable printer_name
- cupsenable printer_name
Configure printers: /etc/cups/printers.conf.
Virtual Printer in linux
To practice the linux Printer command and administration, we’d better to install a virtual printer for this.The CUPS-PDF is a good one for this chapter’s lab.
1, To download it, issue yum install cups-pdf.x86_64
in fedora or go to the website download: http://www.cups-pdf.de/
2, Then, check out the default path of the pdf to be saved, we can find the path in the configuration file, which is located in etc/cups/cups-pdf.conf.
Then find the line like:
Out ${DESKTOP}
in my case, it is saved on desktop be default, you can change it into your desired path.
3, type lpstat -p
to check out the printers available. Or go to the Activities, then search “Printers”, check out if you can find the new virtual printer here, and you can also configure it here.