This is a small old tip, but I want to share it here, in case it may be useful for someone.

Also as a note to myself, as I usually forget how to do it.

I usually like to print from the command line, when I am editing latex documents, programming, or creating markdown. I usually use vim to edit this kind of files.

So, if you need to print from the command line, and assuming you already have the printer installed and working.

lpr file

This will print the file on the default printer

lpr -P printername file

This will print the file on a specific printer, in this case named “printername”.

lpr -P printername -#3 file

This will print the file on the printer “printername”, and will print 3 copies.

lpr -p file

Print a pre-formated file with a shaded header containing, he date, time, job name, and page number.