Forrest logo
tool overview
On this page you find all important commands for the CLI tool lp. If the command you are looking for is missing please ask our AI.

lp

LP is a command line tool used for printing files on Unix-like systems, including Linux. It stands for "line printer." It allows users to send files to a printer for physical printing.

LP is a part of the Common Unix Printing System (CUPS), which provides a portable printing layer. It supports various printer types, including local printers connected to the system or network printers accessible over the network.

Using the LP command, users can specify the printer, number of copies, page range, and print orientation for their print job. It supports options to select the paper size, print quality, and page scaling as well.

LP supports a wide range of file formats, including plain text files, PDFs, PostScript files, and image files such as JPEG and PNG. It automatically converts files to the appropriate format if needed.

Users have the ability to check the status of their print jobs using LP. They can view the print queue, check the status of specific print jobs, and even cancel or prioritize print jobs.

Administrators can configure LP and manage printers using the lpadmin command. They can set up printers, define printer options, and control access permissions for users.

The LP command is often used in conjunction with other commands, such as lpq (to view the print queue), lprm (to remove print jobs), and lpc (to control printer operations).

LP offers a convenient way to manage and control printing tasks from the command line, providing flexibility and automation in the printing process. It is widely used in various Unix-like systems for both personal and enterprise printing needs.

List of commands for lp:

  • lp:tldr:2f4a8 lp: Resume printing a job.
    $ lp -i ${job_id} -H resume
    try on your machine
    explain this command
  • lp:tldr:90a55 lp: Print N copies of file to default printer (replace N with desired number of copies).
    $ lp -n ${N} ${filenamename}
    try on your machine
    explain this command
  • lp:tldr:91089 lp: Print a file to the default printer.
    $ lp ${filenamename}
    try on your machine
    explain this command
  • lp:tldr:d54a6 lp: Print a file to a named printer (see `lpstat` command).
    $ lp -d ${printer_name} ${filenamename}
    try on your machine
    explain this command
  • lp:tldr:f0e65 lp: Print only certain pages to the default printer (print pages 1, 3-5, and 16).
    $ lp -P 1,3-5,16 ${filenamename}
    try on your machine
    explain this command
tool overview