Linux: How to start and stop printer queues

by Vivek Gite on September 17, 2006 · 6 comments

Q. How can I start and stop printer queues for printer called HPLJF2?

A. To stop/start printers and classes queues use enable (to start queue) command. There is also disable command to stop queue.

Linux Printer Control Command names

=> enable or cupsenable: To start the named printers or classes.

=> disable or cupsdisable: To stop the named printers or classes.

Task: Start a print queue

Type the following command to START a print queue for a printer called HPLJF2:
# /usr/bin/enable HPLJF2

Task: Stop a print queue

Type the following command to STOP a print queue for a printer called HPLJF2:
# /usr/bin/disable printer

Please note that use full path name for both commands. Otherwise you will end up running bash internal enable,which is use to enable and disable builtin bash shell commands.

Task: Verify queue is stopped or started

Use lpq command verify the queue is stopped or started:
# lpq

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 6 comments… read them below or add one }

1 kylie April 30, 2007

I have some print queues that drop, I need a script that will check what queues are up and enable anything that is down, my scripting skills are not good enough to be able to setup and automated script. Does anyone have a script that will automatically restart downed print queues in aix 5.3

Reply

2 lakshmi prabha February 13, 2009

i want setting a print server in linux details.

Reply

3 me June 28, 2010

That would be simple. $1000 bucks and it’s yours.

Reply

4 ramamohan February 4, 2011

Hi,

When we restart the print queue, were the jobs still available in the queue.

Reply

5 Diane February 27, 2011

This needs to be update the enable command doesn’t work for printing in RHEL 4 or RHEL 5 ???

Reply

6 p.nawin February 8, 2012

your website is not useful

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 7 + 10 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: