Adding Your First Printer from the Command-Line

  1. Log into the system as root (Alternatively, you can also log into the system as an ordinary user and type su, followed by the root's password).
  2. Run the lpadmin command with the -p option to add a printer to CUPS:

    /usr/sbin/lpadmin -p printer -E -v device -m ppd ENTER
 

E.g. 1
For an HP DeskJet printer connected to the parallel port this would look like:

/usr/sbin/lpadmin -p DeskJet -E -v parallel:/dev/lp0 -m deskjet.ppd ENTER

E.g. 2
Similarly, an HP LaserJet printer using a JetDirect network interface at IP address 11.22.33.44 would be added with the command:

    /usr/sbin/lpadmin -p LaserJet -E -v socket://11.22.33.44 -m laserjet.ppd ENTER

Back