Sonora Communications, Inc.

  • Increase font size
  • Default font size
  • Decrease font size

Manipulate Print Jobs in Linux / SME Server

E-mail Print PDF

The following discussion of printer management is predicated on the assumption that you are using LPR (or a variant) as your base printing system and that you are sharing your printers via SMB protocol (Samba). Linux appears to be moving towards using CUPS as the base printing system, so you may need to adjust for that if you use CUPS already.

To Determine Server-Shared SMB (Windows) Printer

This command will display all Windows shares for a particular server (host). At a Linux console promt, enter the following command:

smbclient -U adminusername -L smbhostname

An equivalent command for the Windows command line is:

net view \\servername

or:

net view \\ip.add.re.ss 

Viewing Print Queues

This command will display all print jobs pending for a particular printer. At a console promt:

lpq -P printername

Print Job Control

If you experience a printer hanging, you may want to restart the printer.

To restart the printer, login to the server console and enter:

lpc start all

then hit enter. The backed-up jobs should all print out.

Deleting Print Jobs

This command will delete all backed up print jobs for a particular printer. At a console prompt:

lprm -P printername all

This command will delete a particular print job for a particular printer. At a console prompt:

lprm -P printername jobnumber

Restart Printer Daemon

This command will restart the LPD print server process. This too will force backed up jobs to print.

At a console promt:

service lpd restart 

or:

/etc/rc.d/init.d/lpd {restart|stop|start}
Last Updated on Saturday, 16 May 2009 18:43  

Your external IP

You are connecting to this site from: 38.107.179.234

Secure Client Login

Email Address:

Password: