System and processes

The lp command

Sends a document to the printer (with -d you choose which one).

Syntax

lp [-d impresora] <archivo>Try it in the terminal →

Most useful options

-dDestination printer

Copy-ready examples

$ sudo systemctl start cupsStart CUPS
$ lp /etc/hostnamePrint a file

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • If CUPS is not active, lp warns that the service is not running.

Related commands

FAQ

What does lp do?

It sends a file to print.

How do I choose the printer?

With lp -d printer-name file.

More System and processes commands

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course