Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

13.7. Printing From The Command Line

Printing is not an involved process whether you click on a button in a GUI or type commands from the command line. This section explains how to print, cancel, and view print jobs from the command line, assuming you have a properly configured printer connected to your system. Refer to Chapter 8 Printer Configuration for more information about setting up your printer.

The lpr command, followed by a filename, sends that specified file to the print queue. For example, lpr foo.txt prints the foo.txt file.

To view the jobs waiting in the print queue, type lpq at the command line. Type lpq, and you will see information similar to this:

active root  389  foo.txt

In this example, 389 is the job number.

You can cancel jobs in the queue by typing lprm followed by the print job number displayed when you use the lpq command. To cancel the foo.txt print job, type lprm 389 and press [Enter].

 
 
  Published under the terms of the GNU General Public License Design by Interspire