Command line printing to usb printer

Smoot Carl-Mitchell smoot at tic.com
Thu Nov 5 18:48:44 UTC 2009


On Thu, 2009-11-05 at 08:39 -0500, Keith Clark wrote:
> On Thu, 2009-11-05 at 06:04 -0700, Karl F. Larsen wrote:
> > Keith Clark wrote:
> > > How do I redirect the output of a command to my USB connected laser
> > > printer.  Here is the output of lpinfo for the target printer:

> Sorry, I should have been a little clearer.  I meant a command on the
> command line (terminal).  My printer works fine when I use GUI
> applications.  I'm using 9.04.

lp or lpr will work.  You need to know the printer name or set it as the
default with lpadmin.

Both accept input from stdin without a file argument.  You might also
want to filter the command output through "pr" to page the output
nicely.  Something like:

<command> | pr | lp -d <printer>

-- 
Smoot Carl-Mitchell
Computer Systems and
Network Consultant
smoot at tic.com
+1 480 922 7313
cell: +1 602 421 9005




More information about the ubuntu-users mailing list