To group printers into a printer class,
add each printer to the class using the following command:
/usr/sbin/lpadmin -p printer_name -c class_name
For example, to add printer snapper to the class fish,
/usr/sbin/lpadmin -p snapper -c fish
If the class does not exist, lpadmin creates it.
A printer does not belong to any class until you add it to one.
To list all the classes and the printers that belong to them, enter:
You see a display similar to:
members of class fish: snapper salmon
To remove a printer from a class, enter:
/usr/sbin/lpadmin -p printer_name -r class_name
For example, remove printer salmon from class fish:
/usr/sbin/lpadmin -p salmon -r fish
If the printer was the only member of the class, the class is removed.
To remove a class, enter:
/usr/sbin/lpadmin -x class_name
Removing a class does not remove the printers that were members of the class.
If the printer or class removed is also the system default destination, the system no longer has a default destination.