Follow the first link. Use a browser for
http://localhost:631/admin to run cups printer manager. There you select a printer ; configure it; and set it to default. Then in terminal you can use the various forms of the print (lpt) command. This assumes that you can use one of the built-in printers. If you need a printer other than the built-in printers, follow the second link. Often, your printer can use one of the built-in printers types for printing text.
You may have to temporarily set a password for root as Anna has done when using Firefox as the browser for running cups manager. Follow the old link by dinky to see an example for configuring a HP LaserJet in cups manager. If you use Firefox, use Anna's info for printing from Firefox.
For a a specific printer, you will need a printer definition file and probably filter/conversion file as shown in Anna'a example for the Samsung printer.
Finally, if your printer is an HP, follow E. Owen's post to get hpji to supply the printer definition file. (first link).
Good luck !