If you want to enable duplex printing via a terminal command (e.g., trying to fix a bunch of already-installed printers with duplex disabled, and you want to fix that with a script), first you have to figure out what parameter to change.
On one Mac with the printer installed, find the printer via System Preferences > Printers & Scanners and then go to Options & Supplies and then Options to see if duplex printing is on. If it’s not on, turn it on via point and click.
Then, in the terminal, put in this command, substituting in the name of your printer for printername:
In my case, I was trying to script duplexing for an HP printer, so the latter showed up this way:
Once you figure out the option you want, the command to enable duplex printing as an option should look something like this:
Acknowledgements: This is based on a helpful post from Mac Rumors from the thread enable “Duplex Printing Unit” in command prompt?