≡ Menu

Linux: How to start and stop printer queues

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

{ 8 comments… add one }

  • kylie April 30, 2007, 10:48 pm

    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

    • Dennis April 19, 2012, 9:31 pm

      I’ve written scripts that will do this for AIX; they also will send e-mail or open a help-desk ticket for stalled queues or queues that can’t be restarted automatically. Let me know if you still need something like this (I know it’s been a long time since you posted).

      • Mohammed Fahad April 21, 2015, 4:28 am

        Dear Bro Dennis

        Kindly share that script., we have configured 200+ printers in AIX more of them are using HP Jetdirect and some of remote printer.,

        we need script to monitor print queue if down it should enable and send mail alert

        Thanks in Advance..
        Mohammed Fahad.

  • lakshmi prabha February 13, 2009, 7:04 am

    i want setting a print server in linux details.

  • me June 28, 2010, 4:42 pm

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

  • ramamohan February 4, 2011, 7:59 pm

    Hi,

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

  • Diane February 27, 2011, 4:02 pm

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

  • p.nawin February 8, 2012, 6:18 am

    your website is not useful

Leave a Comment