Skip to content
Related Articles

Related Articles

accept command in Linux with Examples
  • Last Updated : 30 Jun, 2020

In Linux, accept command is used to request the printer to start accepting print requests in the print queue for a named destination that could be a printer or a class of printer. It also enables the user to submit the print requests to the printer, even when the printer is not connected to the system. These requests can then be processed later using the accept command.


accept [ -E ] [ -U username ] [ -h hostname[:port] ] destination(s)
  • -E – causes the printer to accept requests by enabling the printer automatically.
  • -U – sets the username which is to be sent while connecting to the server.
  • -h – used to connect to a printer at a remote server

Executing accept command for the destination printer(HP-LaserJet-Professional-P1108), which is connected directly to the system.

Step 1. Get the current status of printer by using lpstat command.

lpstat -a -p HP-LaserJet-Professional-P1108


Step 2. Sending the request through accept command.

accept -E HP-LaserJet-Professional-P1108


Step 3. Get the status again in order to check the request by accept command.

lpstat -a -p HP-LaserJet-Professional-P1108


Now the print requests before the execution of the accept command, have been executed and now are not present in print queue.

To connect to a printer at a remote server.
Enter the following command to connect to a printer available at a server and at port 631.

accept -h HP-LaserJet-Professional-P1108

Operation was failed here because no printer is currently available at the port mentioned. But if the printer would be connected then it will accept the request.

My Personal Notes arrow_drop_up
Recommended Articles
Page :